Formula to Group Dates by Quarter in Google Sheets

Here I have one Query formula that can help you to group dates by Quarter in Google Sheets. The formula is so simple so you can easily adapt it for your purpose.

In Google Sheets, you can group your date column by the quarter like Quarter 1, 2, 3, and 4 either by using a Query formula or the Pivot Table.

In this grouping, if the date column has the dates that span across different years, you can consider a year-quarter wise grouping also.

The Pivot Table is the quickest and suggestible solution for novice Google Sheets users for grouping the date column.

Personally, I think it’s not suitable for all the situations as the Pivot Table in Google Sheets creates a new tab.

Must Read: Month, Quarter, Year Wise Grouping in Pivot Table in Google Sheets

Before providing you the Query-based formula to group dates by Quarter in Google Sheets, see this basic dataset and the formula output.

Group Dates by Quarter in Google Sheets

How to Group Dates by Quarter in Google Sheets? Example

Here is that Query formula in Cell E1, that groups dates by Quarter in Google Sheets.

=query({A1:B},"Select quarter(Col1),sum(Col2) where Col1 is not null group by quarter(Col1)")

The highlight of this Query formula is the use of the Quarter Scalar function in Google Sheets Query.

Similar to the Year and Month scalar function, you can use the Quarter scalar function in both the Group Clause and as well as in the Select clause. That is what I’ve done above.

We want the Query formula to group the dates by the Quarter. So instead of selecting dates, in the Query Select clause, we should select the Quarter of the dates in Column A. Then Group, not the dates, but the Quarter of the dates.

Can I Group Dates by Quarter-Year / Year-Quarter in Google Sheets?

Yes! For example, I have my dates in column 1 (A2: A), span across two different years like 2018 and 2019. Here I can group the dates Quart-year wise as follows.

Group Dates by Quarter-Year

The Formula in G1:

=query({A1:B1},"Select quarter(Col1),year(Col1), sum(Col2) where Col1 is not null group by quarter(Col1),year(Col1)")

The procedure to do a Quarter-wise grouping or a Year-Quarter wise grouping is almost the same.

In both cases, you should use the scalar functions in the select clause as well as in the group clause as explained.

Open a blank spreadsheet and experiment with my formulas that can group dates by Quarter in Google Sheets.

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.

Lookup Values Under Categories in Excel and Google Sheets

We can use a combination of XLOOKUP and VLOOKUP in both Excel and Google...

Extract Items Under a Category from the Same Column in Excel

In Excel, you can use a combination of the XLOOKUP and DROP functions to...

How to Create a Searchable Table in Excel Using the FILTER Function

Finding specific records, or rows containing the required information, is straightforward in Excel using...

Time Sequences in Excel by Minute, Hour, or Second Increments

Creating time sequences, whether by hour, minute, or second increments in Excel, can be...

More like this

XMATCH Row by Row: Finding Values Across a Range in Google Sheets

Using the BYROW function with XMATCH in Google Sheets allows us to match values...

Limit Formula Expansion to a Specific Row in Google Sheets

In this tutorial, I’ll explain how to limit the expansion of an array formula...

3-D Referencing Structured Data Tables in Google Sheets

When you have several tables within a single sheet—not across multiple sheets in a...

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.