HomeGoogle DocsSpreadsheetGroup Dates in Pivot Table in Google Sheets (Month, Quarter, and Year)

Group Dates in Pivot Table in Google Sheets (Month, Quarter, and Year)

Published on

Grouping dates in the Pivot table in Google Sheets helps us create monthly, quarterly, and yearly summary reports.

Suppose you have your day-to-day expenses entered in a Google Sheets file.

You can group the date column in that statement to analyze your expenses, such as how much you spent monthly, in which month you were out of control in spending, etc.

One of the benefits of groping dates in the Pivot table is you don’t require the ability to use functions such as Query of Sumif for the same purpose.

Even a novice Google Sheets user can quickly group dates using the Pivot table in Google Sheets.

How to Group Dates in Pivot Table in Google Sheets

Suppose you have the following sample data in a Google Sheets file.

Group Dates in Pivot Table: Sample Data

How do you create a Pivot table out of it? That’s important before answering how to group dates in Pivot Table in Google Sheets.

Steps:

  1. Select the data range A1:D9.
  2. Go to the Insert menu Pivot table.
  3. Select where you want your report to appear. If you select “New sheet” and click “Create,” the program will insert a new tab named “Pivot Table 1” with a skeleton of the pivot table on the top part.

Here you can decide what data you want in rows and columns and which field to calculate.

I have added the following.

Rows: Date

Columns: Item

Values: Qty. (Summarise by Sum)

Pivot Table Editor 2023 Settings

What happens in the result?

If any items repeat on the same date in the source, they will be merged, and their quantity will be summed together.

So initial grouping has happened. Let’s group dates in the Pivot table by month, quarter, and year.

Finding the Menu Option (Command)

We already have a Pivot table report where the first column contains dates. We can group this column straightaway.

The date grouping in the Pivot table feature is hidden behind the right-click shortcut menu.

You won’t see it by right-clicking on anywhere on the Pivot table report or within any cell in the Sheet.

Then how to get it?

Go to any cell that contains a date in the to be grouped column of the Pivot table report.

As per our report, we can choose any cells in the range A3:A7 in the Pivot table report.

Then right click. You will see the option as per the screenshot below.

Create Pivot Date Group Shortcut Command

You will get plenty of date and time grouping options under this command.

Month and Year-Month Grouping in Pivot Table

To group dates by month, open the shortcut menu as explained above and select Create pivot date group > Month. It will group the dates by month.

Use it only to group dates by months when your data is constrained to one year, or you don’t mind if the same months in different years are grouped together.

For example, January 2018 and January 2019 will be grouped together irrespective of the difference in the years they fall.

So, usually, you don’t want that to happen. So I prefer to apply Create pivot date group > Year-Month.

Group Dates by Month, Year, and Quarter in Pivot Table

I have got a detailed tutorial here that also includes a Query solution. Here it is – Month-Wise Pivot Table in Google Sheets Using Date Column.

Quarter and Year-Quarter Grouping in Pivot Table

Quarterly reports are part and parcel of financial statements.

There are four quarters in a year, and the months that fall in that group are as follows.

QuarterMonths
Q1January to March
Q2April to June
Q3July to September
Q3October to December

Follow the below steps to group dates by quarter using the Pivot table in Google Sheets.

Right-click on any date cells, and select Create pivot date group > Quarter or Year-Quarter.

If your dates are spread across years, use Year-Quarter.

Year Grouping

Finally, here is how to group dates by year in the Pivot table in Google Sheets.

By now, you may already know how to do this. Here you go!

Right-click on any date cells, and select Create pivot date group > Year.

That’s all. Thanks for the stay. Enjoy!

Related: Drill Down Detail in Pivot Table in Google Sheets [Date Grouping].

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

Running Total By Month in Excel

This tutorial demonstrates how to calculate the running total by month in a range...

SORT and SORTBY – Excel Vs Google Sheets

While Excel offers the SORT and SORTBY functions for sorting a table, Google Sheets...

Get Top N Values Using Excel’s FILTER Function

When using the FILTER function in Excel to extract the top N values, it's...

XLOOKUP in Excel: Working with Visible Rows in a Table

In Excel, the XLOOKUP function isn't inherently designed to exclusively work with visible rows;...

More like this

Interactive Random Task Assigner in Google Sheets

You have multiple tasks and multiple people. Here's a fun way to randomly assign...

Google Sheets Bar and Column Chart with Target Coloring

To color each data point in the column or bar chart according to the...

Analyzing Column A Between Non-Adjacent Values in Column B: Google Sheets

This tutorial addresses a common scenario encountered in Google Sheets: how to sum, average,...

6 COMMENTS

  1. What about the months in a column for a pivot? Mine are going alphabetically and I would like to see them chronologically.

  2. Great info and superb tip Shay!

    Prashanth – Shay has mentioned adding the additional date to the pivot using the same Date field in datasheet, so no need to add Date column in data sheet. Try it!

  3. Great jobs demonstrating the new date grouping features in Google Sheets. One tip I have is to use the Date column multiple times when you want to drill down to a lower level.

    Take your Month and Year wise grouping example, first add Date to the Pivot Table, right click on a date in the table and select Year. Then add Date again to the Pivot Table, but this time right click on a date in column 2 of the pivot table and select Month for Group.

    Now you can collapse the table all the way to the Year level or drill down as a whole or within a single year and month to see each date’s transactions.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.