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
Date.QuarterOfYear( dateTime as any ) as nullable number
Returns a number from 1 to 4 indicating which quarter of the year the date
dateTime falls in.
dateTime can be a
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:
- 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
Other functions related to Date.QuarterOfYear are: