Grouping dates in a pivot table turns a long list of individual dates into meaningful time periods
When you drag a date column into a pivot table's row or column area, spreadsheet software normally shows every single date as its own row — which makes the table hard to read and defeats the purpose of summarizing. Grouping lets you bundle those dates into months, quarters, years, or custom ranges so you can see patterns instead of noise.
The process differs slightly between Excel, Google Sheets, and LibreOffice, but the core idea is the same: right-click the date field in your pivot table and choose a grouping option. This article walks you through each program's specific steps.
Key Takeaways
- In Excel, right-click any date in the pivot table's row or column area, select "Group", and choose your time period from the dialog box.
- Google Sheets does not have automatic date grouping in pivot tables; you must create a helper column with formulas like MONTH() or QUARTER() before building the pivot table.
- LibreOffice Calc groups dates through the Data menu after you select the date field in the pivot table layout.
- Grouping by month is the most common choice for business data, but quarter and year grouping work better for high-level trend analysis.
- Once grouped, you can still drill down or ungroup dates if you need to see the underlying detail again.
How to group dates in Excel pivot tables
Open your pivot table and locate the date field in the Rows or Columns area. Click on any single date value inside the pivot table itself — not the field name at the top, but an actual date cell like "1/15/2024".
Right-click that date cell. A context menu appears. Select "Group" from the menu. A dialog box titled "Grouping" opens, showing options like Days, Months, Quarters, Years, and custom ranges. Choose the time period you want. If you select "Months", Excel automatically groups all dates by month and month-year. If you select "Quarters", it groups by quarter and year.
Click OK. The pivot table rebuilds instantly, and your dates now appear as grouped periods instead of individual dates. If you grouped by months, you will see entries like "January 2024", "February 2024", and so on. You can expand or collapse each group by clicking the small plus or minus sign next to it.
How to group dates in Google Sheets pivot tables
Google Sheets pivot tables do not have a built-in date grouping feature like Excel does. Instead, you must create a helper column before you build the pivot table.
In a new column next to your original data, use a formula to extract the time period you want. For months, use =TEXT(A2,"YYYY-MM") where A2 is your date cell — this produces "2024-01" format. For quarters, use =CONCATENATE(YEAR(A2),"-Q",ROUNDUP(MONTH(A2)/3,0)) to get "2024-Q1". For years only, use =YEAR(A2).
Copy the formula down for every row of data. Then create your pivot table as usual, but drag this new helper column into the Rows area instead of the original date column. The pivot table will now group by the time period you created. This approach takes an extra step, but it gives you full control over how dates are grouped.
How to group dates in LibreOffice Calc pivot tables
Right-click the date field name in the pivot table's layout area — the field itself, not a data cell. Select "Properties" or double-click the field name to open the field dialog.
Look for a "Grouping" tab or section. If it appears, select your grouping option: Days, Months, Quarters, Years, or a custom range. Click OK. LibreOffice rebuilds the pivot table with dates grouped by your chosen period.
If the Grouping tab does not appear, your version of LibreOffice may require a different approach: select the entire pivot table, go to the Data menu, and look for a "Group and Outline" or "Pivot Table" submenu. The exact location varies by LibreOffice version.
Choosing between months, quarters, and years
The right grouping depends on how much detail you need and how much data you have. Monthly grouping is the most common choice for business reports — it shows enough detail to spot seasonal patterns or month-to-month changes without overwhelming you with rows. Use it when you have at least a few months of data and want to see trends.
Quarterly grouping works better for executive summaries or when you have years of data. It reduces the number of rows and makes year-over-year comparisons easier. Yearly grouping is useful only when you have data spanning many years and you want a high-level overview.
If you are unsure, start with months. You can always regroup by selecting the date field again and choosing a different period.
Ungrouping dates or changing the grouping later
If you grouped by months but want to see individual dates again, right-click any date in the pivot table and select "Ungroup". The pivot table returns to showing every single date.
To change from months to quarters without ungrouping completely, right-click a date and select "Group" again. Choose the new time period. The pivot table updates instantly. You do not need to rebuild the entire pivot table.
Common problems and fixes
If the "Group" option does not appear when you right-click, you may have clicked the field name instead of an actual date value in the pivot table. Click a cell that contains a date — like "3/15/2024" — not the column header.
In Google Sheets, if your helper column formula produces errors, check that your original date column contains actual dates, not text that looks like dates. A date stored as text will not work with the TEXT() or YEAR() functions. You can convert text to dates using the DATEVALUE() function first.
If your grouped dates appear in the wrong order — for example, "April 2024" before "January 2024" — the dates may be stored as text. Rebuild the pivot table after converting the date column to actual date format. In Excel, use Data > Text to Columns. In Google Sheets, use the DATEVALUE() function in a helper column.
Frequently Asked Questions
Can I group dates by week instead of month?
Excel and LibreOffice allow week grouping through the Group dialog, though it is less common. Google Sheets does not offer week grouping natively, but you can create a helper column with =CONCATENATE(YEAR(A2),"-W",WEEKNUM(A2)) to group by week number. The result will be less readable than month grouping.
What if my dates are formatted as text, not actual dates?
Grouping will not work on text. In Excel, select the date column and use Data > Text to Columns, then click Finish to convert text to dates. In Google Sheets, wrap your date column in DATEVALUE() in a helper column. In LibreOffice, use Data > Text to Columns the same way as Excel.
Can I group dates by custom ranges, like fiscal years?
Excel allows custom grouping through the Group dialog — you can specify a starting date and interval. For fiscal years that do not align with the calendar, create a helper column with a formula that assigns each date to the correct fiscal year, then group by that column instead.
Why does my pivot table show blank rows after grouping?
Blank rows usually appear when your original data contains empty date cells or dates that are stored as text. Filter out or fix those rows before rebuilding the pivot table. In Excel, you can also right-click the blank row in the grouped pivot table and select "Hide" to remove it from view.
Can I group dates and numbers in the same pivot table?
Yes. Drag the date field to Rows and group it as described above. Drag any number field to Rows as well — it will not group automatically, and that is correct. Only date fields group by time period. Number fields can be grouped separately if needed, but they use different grouping logic.