Collapse & Expand Pivot Table Groups
In this article
This guide shows you how to collapse and expand grouped fields in a pivot table, such as date groups (months, quarters, years) or custom groups you create. You'll learn the exact clicks for both Windows and Mac, plus keyboard shortcuts, so you can quickly switch between a summary view and a detailed view of your data.
What You'll Need
- A pivot table that contains at least one grouped field (e.g., dates grouped by month, or a custom group like "High/Medium/Low").
- Access to Excel (2016 or later) or Google Sheets. The steps are nearly identical in both.
- The PivotTable Fields pane visible (if it's hidden, click anywhere in the pivot table and it should appear).
Step-by-Step
- Click anywhere inside the pivot table. This activates the PivotTable Tools and shows the field list. If you click a cell that is part of a group, you'll also see a small plus/minus icon appear to the left of the group header.
- Locate the grouped field. In the PivotTable Fields pane, find the field that contains groups (e.g., "Months" or "Product Groups"). It will be listed under "Rows" or "Columns" area.
- Use the +/- buttons in the pivot table. The simplest method: click the small plus (+) or minus (–) icon that appears next to a group header (like "2023" or "Q1"). Clicking + expands that group to show its members; clicking – collapses it.
- Expand or collapse all groups at once. Right-click on any group header (e.g., right-click on "2023"). In the context menu, choose Expand/Collapse and then select Expand Entire Field or Collapse Entire Field. This affects every group in that field, not just the one you clicked.
- Use the Ribbon (Excel only). With the pivot table selected, go to the PivotTable Analyze tab (or just "Analyze" in some versions). In the "Active Field" group, click Expand Field or Collapse Field. This does the same as the right-click option but is handy if you prefer the ribbon.
- Keyboard shortcut (Excel only). Select any cell inside a group, then press Alt+A, J to expand the field, or Alt+A, I to collapse it. (These are legacy shortcuts that still work in modern Excel.)
- In Google Sheets: The process is similar. Right-click a group header, choose Expand/Collapse, then pick the option. You can also click the small triangle next to the group header to toggle just that group.
- Collapse a specific group only. If you want to collapse just one group (like only "2022" while keeping "2023" expanded), click the minus icon next to that group's header. This is the most precise way.
- Re-expand after collapsing. To bring back the details, click the plus icon next to the group header, or use the right-click menu → Expand/Collapse → Expand Field.
Common Mistakes
- Clicking the wrong icon: The plus/minus icons appear only when you hover over the group header. Clicking on the cell value (not the header) does nothing.
- Collapsing the wrong field: If you have multiple grouped fields (e.g., both "Year" and "Quarter"), make sure you right-click on the correct field's header. The right-click menu applies only to the field you clicked.
- Expecting to collapse a single item that isn't a group: You can only collapse groups, not individual items. If you have a field with no grouping (like a plain text field), the expand/collapse options are grayed out.
- Forgetting to refresh after changing source data: If you add new dates or categories, the groups may not update until you refresh the pivot table (right-click → Refresh).
- In Google Sheets, using the wrong menu: The "Expand/Collapse" option is under the right-click menu, not under the "More" (three dots) menu. Look for it specifically.
Tips
- Use the field list to quickly jump: In the PivotTable Fields pane, you can right-click the field name itself and choose Expand/Collapse. This is useful if the pivot table is large and you can't easily find a group header.
- Create a custom view: Collapse all groups to get a high-level summary, then expand only the groups you need to analyze in detail. This keeps the pivot table clean.
- Keyboard shortcut for toggling: In Excel, you can also press Ctrl+Shift+8 (on Windows) to expand or collapse the selected group, but this depends on your version. The Alt shortcuts are more reliable.
- Group dates automatically: If you haven't grouped dates yet, right-click a date field, choose "Group," and select months/quarters/years. Then you can collapse/expand as described.
- Use the +/- icons for quick toggling: They are the fastest way when you only need to adjust one group.
Troubleshooting
- No plus/minus icons appear: Make sure the group field is in the Rows or Columns area, not in the Filters area. Also, check that the field is actually grouped (right-click and see if "Ungroup" is available). If not, you need to create a group first.
- Expand/Collapse options are grayed out: This usually means the selected cell is not part of a group. Click on a group header (e.g., "2023") or any cell within that group, then try again.
- Collapsing a field removes all data: That's normal – collapsing hides the detail rows. To bring them back, expand the field. If you want to keep the detail but just hide it, collapsing is the right action.
- In Google Sheets, the right-click menu doesn't show Expand/Collapse: Ensure you right-click on the group header (like "2023") and not on a regular cell. Also, check that the field is grouped – if you haven't grouped it, the option won't appear.
- Changes don't persist after refreshing: Pivot tables remember the expanded/collapsed state per field, but if you change the source data and refresh, the state may reset. To keep it, you might need to re-collapse after refresh, or use a slicer to filter instead.
Frequently Asked Questions
Can I collapse groups in a pivot table chart? No, pivot charts always show all data. You need to collapse the pivot table first, and the chart will update to show only the visible data.
Why can't I see the plus/minus icons in Google Sheets? They appear only when you hover over the group header. If you don't see them, try clicking on the header first, or use the right-click menu.
Does collapsing affect the underlying data? No, it only hides the detail in the pivot table. The source data remains unchanged.
Can I collapse multiple groups at once? Yes, use the "Expand Entire Field" or "Collapse Entire Field" option from the right-click menu. This applies to all groups in that field.
How do I ungroup a field after grouping? Right-click on the grouped field, choose "Ungroup," and the groups will be removed, reverting to individual items.
Is there a way to collapse all groups in a pivot table with one click? Yes, right-click on any group header, choose Expand/Collapse, then Collapse Entire Field. Repeat for each grouped field if you have more than one.