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
Returns a number from 1 to 4 indicating which quarter of the year the date dateTime
falls in. dateTime
can be a date
, datetime
, or datetimezone
value.
Examples
Find which quarter of the year the date #date( 2011, 12, 31 ) falls in.
// Output: 4
Date.QuarterOfYear( #date( 2011, 12, 31 ) )
Related articles
Learn more about Date.QuarterOfYear in the following articles:
- Create Date Table or Calendar in Power Query M
Learn how to create a dynamic calendar table in Power Query’s M language. Build your custom columns and claim your free Date Table Script. » Read more
Related functions
Other functions related to Date.QuarterOfYear are:
- Date.Day
- Date.DayOfWeek
- Date.DayOfYear
- Date.DaysInMonth
- Date.Month
- Date.WeekOfMonth
- Date.WeekOfYear
- Date.Year
