← Back to all guides
Technology · 4 min READ

How to Group Pivot Table Dates by Month and Year in LibreOffice Calc

How to Group Pivot Table Dates by Month and Year in LibreOffice Calc guide illustration

Turn daily transactions into monthly totals, keep two Decembers in different years separate, and recover when Calc does not offer date grouping.

Quick note

Follow these steps at your own pace. Check product terms and prices directly with providers before purchasing.

Quick answer

Click one date label inside the pivot result and choose Data → Group and Outline → Group. Under Group by, choose Intervals and tick both Months and Years. Each calendar year gets its own monthly totals, while the source transactions keep their original dates.

Start with daily dates in the pivot

Use a source with a header row, one transaction per row, a real date field and a numeric amount. In the pivot layout, put Date in Row Fields and Amount in Data Fields. Check that Amount uses Sum. Count answers how many transactions occurred and can look plausible even when the money total is wrong. Note the grand total and any active filters before changing the layout.

Choose calendar months and years

  1. In the pivot result, click a date label such as December 3, 2025. Avoid the Date heading, the sales amount beside it, and the grand total. Grouping cells on the original worksheet opens a different tool.
  2. Choose Data → Group and Outline → Group, or press F12. Leave Start and End on Automatically to cover the range from the earliest to the latest source date.
  3. Select Intervals. Turn on Years and Months, clear extra intervals, and click OK. Fixed 30-day blocks drift across calendar boundaries. For calendar quarters, use Years and Quarters instead.

Test the December-to-January boundary

Suppose December 3 and December 21, 2025 have sales of $40 and $60. January 2, 2026 has $30, and December 4, 2026 has $15. Look for these three monthly figures in the result.

YearMonthSales
2025December$100
2026January$30
2026December$15

The grand total is still $145. A single December row showing $115 means the two Decembers have been combined. Check that Years is selected and appears in the report. To change an existing grouping, click a grouped label, choose Data → Group and Outline → Ungroup, then repeat with both intervals.

If Calc does not offer Months and Years

Enter =ISNUMBER(A2) in a blank cell to test a suspect source date in A2. A FALSE result for a populated date string points to text. Convert the imported text dates in Calc, confirm day/month order against a known transaction, then refresh the pivot.

For a sortable month-year field, use a working copy of the source and add a column named Month start. For a valid date in A2 enter =DATE(YEAR(A2);MONTH(A2);1) and fill down the dated rows. Each transaction now has the first day of its own month. Format that column as month and year, include it in the pivot source, and use it as the row field. When future imports add transactions, check the source range and refresh the pivot before comparing months.

LibreOffice’s guide to grouping pivot dates · Calc pivot grouping controls

SHARE THIS GUIDE

Know someone who could use this?

DISCUSSION

Comments

Read or join the discussion.