Group or ungroup data in a PivotTable
Applies To
Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel 2024 Excel 2021 Excel 2019 Excel 2016Grouping data in a PivotTable can help you show a subset of data to analyze. For example, you may want to group an unwieldy list date and time fields in the PivotTable into quarters and months
-
In the PivotTable, right-click a value and select Group.
-
In the Grouping box, select Starting at and Ending at checkboxes, and edit the values if needed.
-
Under By, select a time period. For numerical fields, enter a number that specifies the interval for each group.
-
Select OK.
-
Hold Ctrl and select two or more values.
-
Right-click and select Group.
With time grouping, relationships across time-related fields are automatically detected and grouped together when you add rows of time fields to your PivotTables. Once grouped together, you can drag the group to your Pivot Table and start your analysis.
-
Select the group.
-
Select Analyze > Field Settings. In the PivotTable Analyze tab under Active Field click Field Settings.
-
Change the Custom Name to something you want and then select OK.
-
Right-click any item that is in the group.
-
Select Ungroup.
-
In the PivotTable, right-click a value and select Group.
-
In the Grouping box, select Starting at and Ending at checkboxes, and edit the values if needed.
-
Under By, select a time period. For numerical fields, enter a number that specifies the interval for each group.
-
Select OK.
-
Hold Ctrl and select two or more values.
-
Right-click and select Group.
With time grouping, relationships across time-related fields are automatically detected and grouped together when you add rows of time fields to your PivotTables. Once grouped together, you can drag the group to your Pivot Table and start your analysis.
-
Select the group.
-
Select Analyze > Field Settings. In the PivotTable Analyze tab under Active Field click Field Settings.
-
Change the Custom Name to something you want and then select OK.
-
Right-click any item that is in the group.
-
Select Ungroup.
Need more help?
You can always ask an expert in the Excel Tech Community or get support in Communities.