Downloads
Power Query MDateBeginner

Date.StartOfQuarter

Returns the first day of the calendar quarter that contains a date.

Syntax
Date.StartOfQuarter(dateTime as any) as date

Returns: The first day of the quarter as a date, or null when the input is null.

What it does

Date.StartOfQuarter returns the first day of the quarter that holds a date. January 1, April 1, July 1 or October 1 is the result, depending on the quarter. It is the start of a quarter to date range, and it sets the period start for quarterly accruals.

Syntax and arguments

Example

A quarter to date report sums sales from the start of the quarter to the report date. The start of the quarter is calculated from the report date.

let
    ReportDate = #date(2026, 10, 29),
    QuarterStart = Date.StartOfQuarter(ReportDate),
    QuarterEnd = Date.EndOfQuarter(ReportDate),
    Days = Duration.Days(ReportDate - QuarterStart)
in
    {QuarterStart, QuarterEnd, Days}

The quarter starts on October 1, 2026 and ends on December 31, 2026. October 29 is 28 days after the quarter started, so Days is 28. The quarter to date range is every date from QuarterStart to ReportDate.

Example: a second, different use

Group a list of postings into quarters by using the quarter start as the group key, which keeps the quarters in order.

Things to watch

In business terms

Quarter to date sales, quarterly accruals and the quarterly close all start from the quarter's first day. Having that date on every row keeps a year to date and a quarter to date view consistent.

Related functions

All Power Query M functions · View as Markdown · M basics