When a PivotTable contains a date field, Excel displays every individual date as its own row by default. If your dataset spans months or years, that can mean hundreds of rows, making it nearly impossible to spot patterns at a glance.
PivotTable date grouping solves this by consolidating individual dates into larger time periods such as months, quarters, years or weeks without changing your source data. By grouping within the PivotTable itself, you avoid constantly changing your source data and creating multiple PivotTables from the same data.
Common use cases for Excel pivot table date grouping include:
PivotTables have some useful "hidden" features that can make interpreting your data even easier—one reason grouping is a staple in any advanced Excel toolkit. The Group feature is one of the most powerful, and the steps below walk you through every option.
Before you group dates in a pivot table, confirm the following prerequisites so the grouping feature works correctly:
Download the example workbook: To follow along using our example data, download Group PivotTables by Month.xlsx
Right-Click on any cell within the Dates column and select Group from the fly-out list. Then select Month in the dialog box. Using the Starting at: and Ending at: fields, you can even specify the range of dates that you want to group if you don't want to group the entire list.
If your data spans multiple years, grouping by month alone combines the sales data for each month into one line, representing the sum of all years. Notice that in our example, there are three years' worth of data. We might use this information to see if there are seasonal sales trends throughout the year, based on several years of data.
However, if you wish to see linear trends over all three years, simply add Years to your choice in the Groupings dialog box. When you add more than one Group by, you can then collapse and expand the groups by clicking the + or icon beside the group:
Step Three: Group Your PivotTable by Week
There is not a "Week" selection in the Grouping dialog box. To organize your data by week, select Days, then put 7 in the Number of days: field:
In our example, you might notice that the first "week" is July 4-July 10, which was a Thursday-Wednesday. This happens because our first recorded date is July 4. To show a traditional Sunday-Saturday work week in your groups, manually set the Starting at field to a Sunday close to your first recorded date, such as June 30:
Once you have grouped your data by month, you may want to learn something different about your data, such as how your sales totals change month by month. Your PivotTable can show your monthly sales numbers in terms of the difference from the previous month.
To show "Difference from" totals, click on any number in the column you want affected, in this case "Sum of Order Amount", then click Value field settings from the Active Field group on the Analyze tab.
On the Show Values As tab in the dialog box, choose Difference From in the Show values as dropdown menu, and (previous) from the Base item selection box. Your PivotTable will now show how each Salesperson performed over time by indicating the difference in sales from the previous month.
Grouping data within a PivotTable, and especially date-based data, allows you to combine the analysis power of the PivotTable with the familiar tools that make reading the results much more useful. In this guide you learned how to:
These techniques work with any date-based dataset, whether you're analyzing sales orders, expense reports, support tickets or project timelinesand they pair well with date or time charts for visual trend analysis.
Ready to sharpen your Excel skills further? Pryor Learning offers hands-on Excel training courses designed to take you from everyday tasks to advanced data analysis.
If the Group option is grayed out or missing when you right-click a date cell, one of the following issues is usually the cause:
After correcting any of these issues, refresh your PivotTable and try right-clicking the date field again.