Applies to: Excel for Office 365, Excel 2019, Excel 2016, Excel 2013, Excel 2010, Excel 2007.
Grouping data in a PivotTable can help you show a subset of data to analyse. For example, you may want to group an unwieldy list of dates or times (date and time fields in the PivotTable) into quarters and months, like this image.
Note: The time grouping feature is new in Excel 2016. 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.
- 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.
Group selected items
- Hold Ctrl and select two or more values.
- Right-click and select Group.
Name a group
- Select the group.
- Select Analyse > Field Settings.
- Change the Custom Name to something you want and select OK.
Ungroup grouped data
- Right-click any item that is in the group.
- Select Ungroup.