Back to articles
IntermediateTime and Date
2026-11-2210 min read
#pivot-tables

Group Dates by Month, Quarter, and Year in an Excel PivotTable

Table of Contents

To group dates in a PivotTable, right-click a date item, choose Group, and select Years and Months. Keep the year above the month in the row fields so January 2025 and January 2026 have separate totals. Add Quarters when you also need a quarterly view.

Changing a date's number format to show a month name only changes its appearance. Grouping is what brings the transactions for that period into one total. The year matters: in the example below, January's revenue is 160 in 2025 and 200 in 2026. Grouping by month alone combines them into 360.

Start with real dates in the source

Download the shared sales example workbook to follow along. It opens on Start; switch to Source for the transactions or Dates for the grouped report.

The example uses eight invented sales records in an Excel Table named Sales, at Source!A1:E9. Revenue is a number with no particular currency attached. The Date cells contain numeric Excel dates displayed as yyyy-mm-dd.

Order IDDateRegionProductRevenue
S012025-01-10EastTea100
S022025-01-20WestCoffee60
S032025-04-12EastCoffee40
S042025-10-08WestTea100
S052026-01-08EastTea120
S062026-01-22WestCoffee80
S072026-04-16EastCoffee60
S082026-10-02WestTea40

Sales is the Excel Table's name, separate from its worksheet name. If you need help inserting the report, use the beginner PivotTable walkthrough. For this example, the date report starts at Dates!A3 and uses Sales as its source.

Put Date in Rows and Revenue in Values, summarized by Sum. Keep the report unfiltered while checking the example: all eight records add to 600.

Excel may create time-grouping fields when you add Date. In the Excel for Mac example shown here, it automatically added year, quarter, and month fields alongside the original Date field. Inspect the row fields before changing anything. If years and months are already present, check their order and the results below rather than assuming you must start with a list of individual dates.

Group by month and year together

  1. Select a date item inside the PivotTable's row labels. Select the date, rather than a revenue amount or the Date column heading in the source.
  2. Right-click and choose Group.
  3. Check that Starting at and Ending at cover the source dates: 2025-01-10 through 2026-10-02 in this example. The automatic bounds can extend beyond the last transaction; the dialog shown below ends on October 3, although the last source date is October 2.
  4. Under By, select Months and Years. Clear other periods for this first view, then choose OK.
  5. Arrange the grouped row fields with the year above the month. Expand the years to see their months.

These are the desktop grouping controls documented in Microsoft's Group or ungroup data in a PivotTable. The page includes Windows and Mac instructions; this walkthrough concerns an ordinary worksheet-based PivotTable.

Check the January totals against the source. The two January 2025 records contain 100 + 60 = 160. The two January 2026 records contain 120 + 80 = 200. Those amounts belong under separate years.

YearJanuaryAprilOctoberYear total
202516040100300
20262006040300

This table is a compact check of the expected totals; your PivotTable can list the months down the rows. Keep them in calendar order within each year.

Why January becomes 360 without a year

A month-only summary answers a different question: how much revenue belongs to January across all years in the source?

Grouping by Months alone in a copy of this example produced January 360, April 100, and October 140. The grand total was still 600, so checking only the grand total won't reveal that you've combined the years.

Use month-only grouping when that combined comparison is intentional. For a report that tracks each calendar month over time, retain the year field above the month field.

Add calendar quarters

Open Group again from a date-group item and select Years, Quarters, and Months. Arrange the row fields in that order: year first, quarter second, month third.

Grouping dialog with Months, Quarters and Years selected and automatic date bounds.
Excel for Mac: group the date items by Months, Quarters and Years.

In this example, the fields are named Years (Date), Quarters (Date), and Months (Date). If the original Date field is also in Rows, remove it from that area to stop the report at monthly detail.

The hierarchy lets you read a year, then a quarter within that year, then its months. For the example, the detail totals are:

YearQuarterMonthSum of Revenue
2025Qtr1Jan160
2025Qtr2Apr40
2025Qtr4Oct100
2026Qtr1Jan200
2026Qtr2Apr60
2026Qtr4Oct40
Grand Total600
Revenue grouped by years, quarters and months, with January 160 in 2025, January 200 in 2026 and total 600.
The year hierarchy keeps January 2025 and January 2026 separate; total revenue remains 600.

The screenshot uses a tabular layout with repeated labels and no subtotals. Its headers occupy Dates!A3:D3; January's amounts are 160 in D4 and 200 in D7, and D10 is 600. If you use a different report layout, compare the year and month labels rather than relying on those cell addresses.

Calendar Q1 covers January–March, Q2 April–June, Q3 July–September, and Q4 October–December. Excel labels them Qtr1, Qtr2, and so on in this example. There are no July–September transactions here, so an absent Q3 doesn't mean Excel lost a record. You don't need to add a zero-value source row to make these totals correct.

Each populated quarter contains just one populated month in this small example. That is why 2025 Q1 and January both total 160. In a source with February and March sales, Q1 would include those amounts too. These are calendar quarters; a fiscal calendar needs a different reporting design.

Choose how much detail to show

Once the dates are grouped, the row-field arrangement controls the level of detail:

Report you needGrouped fields in Rows, from top to bottom
Annual totalsYear
Quarters within each yearYear, Quarter
Months within each yearYear, Month
Months within quarters and yearsYear, Quarter, Month

Keep Sum of Revenue in Values. With no filters, an annual view should show 2025: 300 and 2026: 300. Changing the detail level shouldn't change the combined revenue of 600.

Removing a grouped field from Rows changes the report layout. To remove grouping itself, right-click an item in the group and choose Ungroup. In the demonstration copy, this returned Dates to eight individual date items, still totaling 600.

The example's PivotTables share a cache, Excel's stored copy of the source data. Ungrouping removed the generated date fields from their shared field list. The existing Start and Percent reports kept their layouts, totals, and percentage settings in that check, but the date fields weren't isolated to the Dates report. Those reports also retained their results after restoring year/quarter/month grouping, refreshing, saving, and reopening the demonstration copy. Try alternate groupings in a separate workbook copy and check your other reports before keeping the changes.

If you edit or add source records, refresh the PivotTable before checking its totals. The PivotTable refresh guide explains how to check source coverage when new records don't appear. Grouping determines the periods; it doesn't make an out-of-date report current.

For a different comparison using the same sales records, show revenue as a percentage of a PivotTable total. Check the amounts and active filters first so you know which total the percentage uses.

Check a filtered date report

To compare one region's dates, use a copy of the example. Move the title out of Dates!A1 before adding a report filter: the filter needs room above the PivotTable. Add Region to Filters and select East in the filter at B1.

In the Excel for Mac demonstration, East's records totaled 140 in 2025 and 180 in 2026, for a Grand Total of 320. Those are the amounts from East's four source rows. Clear the filter to include both regions again; the total should return to 600. Remove Region from Filters when returning to the original layout.

If the dates won't group

Start with the source Date column, not its appearance in the report. A cell can look like a date while containing text, and a date number format doesn't convert that text into a numeric Excel date.

In a disposable copy tested in Excel for Mac 16.114, replacing the date in Source!B2 with text and choosing Data > Refresh All removed the grouped date fields. After adding the original Date field back to Rows, choosing Group displayed “Cannot group that selection.” That's one observed text-date case, not a message every workbook or Excel version must show.

A blank behaved differently in a separate copy on the same Mac version. Clearing Source!B2 and choosing Refresh All removed the grouped date fields. Selecting the Date checkbox again automatically grouped the report and placed that transaction's 100 under <1/20/25, without the text case's error alert. The grand total remained 600, but the transaction no longer had its correct calendar date. Check the source even when grouping produces no error.

Work through these checks before changing the grouping settings repeatedly:

What to inspectWhat to check or correct
Text in Date cellsCheck imported or pasted values, including dates preceded by an apostrophe. Correct the source to contain real dates, checking day and month order against the original records.
Blank Date cellsIdentify which transaction is missing its date and recover the date from the original record. Don't insert an arbitrary date just to make a calendar total.
Errors in Date cellsResolve the source error and confirm the resulting value is the intended date.
Source coverageCheck that the report uses the intended table or range and that every included row belongs to the dataset.
PivotTable source typeThese steps use a local Excel Table. A report connected to a Data Model or another analytical source may need a different approach.

After correcting source data, refresh the report and inspect its date fields and totals again. The symptom and required regrouping steps can depend on the workbook and Excel version; a particular error message alone isn't a diagnosis.

For the unchanged example, finish by checking three things: January 2025 is 160, January 2026 is 200, and the unfiltered Grand Total is 600. Together, those checks confirm the year boundary as well as the total.

Enjoyed this guide?

Join our newsletter to get the latest Excel tips delivered to your inbox.

You can unsubscribe anytime. See our Privacy Policy.