QUARTER DAX Function (Date and Time)
Returns a number from 1 (January-March) to 4 (October-December) representing the quarter.
Syntax
Parameter | Attributes | Description |
---|---|---|
Date |
A date in datetime format. |
Return values
An integer number indicating the number of the quarter.
Remarks
If the argument is a string, it is translated into a datetime value using the same rules applied by the DATEVALUE function.
» 3 related functions
Examples
-- Extract date parts from a date EVALUATE ADDCOLUMNS ( TOPN ( 10, VALUES ( 'Date'[Date] ), 'Date'[Date], ASC ), "Year", YEAR ( 'Date'[Date] ), "Quarter", QUARTER ( 'Date'[Date] ), "Month", MONTH ( 'Date'[Date] ), "Day", DAY ( 'Date'[Date] ) ) ORDER BY 'Date'[Date]
Date | Year | Quarter | Month | Day |
---|---|---|---|---|
2005-01-01 | 2,005 | 1 | 1 | 1 |
2005-01-02 | 2,005 | 1 | 1 | 2 |
2005-01-03 | 2,005 | 1 | 1 | 3 |
2005-01-04 | 2,005 | 1 | 1 | 4 |
2005-01-05 | 2,005 | 1 | 1 | 5 |
2005-01-06 | 2,005 | 1 | 1 | 6 |
2005-01-07 | 2,005 | 1 | 1 | 7 |
2005-01-08 | 2,005 | 1 | 1 | 8 |
2005-01-09 | 2,005 | 1 | 1 | 9 |
2005-01-10 | 2,005 | 1 | 1 | 10 |
Related articles
Learn more about QUARTER in the following articles:
-
Computing MTD, QTD, YTD in Power BI for the current period
This article describes how to use the DAX time intelligence calculations applied to the latest period available in the data, also known as the “current” period. » Read more
Related functions
Other related functions are:
Last update: Nov 14, 2024 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://docs.microsoft.com/en-us/dax/quarter-function-dax