Date.QuarterOfYear

Updated on

Date.QuarterOfYear is a Power Query M function that returns a number from 1 to 4 indicating which quarter of the year the date falls in. You can provide a date, datetime, or datetimezone value.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Date.QuarterOfYear( dateTime as any ) as nullable number

Description

Given a date, datetime, or datetimezone value (dateTime), Date.QuarterOfYear returns a number from 1 to 4. This number signifies the quarter of the year in which dateTime falls.

Examples

Find which quarter of the year the date #date( 2011, 12, 31 ) falls in.

// Output: 4
Date.QuarterOfYear( #date( 2011, 12, 31 ) )

Learn more about Date.QuarterOfYear in the following articles:

Other functions related to Date.QuarterOfYear are:

BI Gorilla Youtube Channel

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/date-quarterofyear