QUARTER

Updated on

QUARTER is a DAX function that returns the quarter component from a date, ranging from 1 (January-March) to 4 (October-December).

Syntax

QUARTER( Date )
Argument Properties Description
Date A date in datetime format.

Return Values

An integer number from 1 to 4.

Remarks

If the input value is BLANK, the output value is also BLANK.

Example 1

The following DAX query:

EVALUATE { QUARTER(DATE(2019, 2, 1)), QUARTER(DATE(2018, 12, 31)) } 

Returns:

[Value]
1
4

Example 2

The following DAX query:

EVALUATE
ADDCOLUMNS(
    FILTER(
        VALUES(
            FactInternetSales[OrderDate]), 
            [OrderDate] >= DATE(2008, 3, 31) && [OrderDate] <= DATE(2008, 4, 1)
        ), 
    "Quarter", QUARTER([OrderDate])
)

Returns:

FactInternetSales[OrderDate] [Quarter]
3/31/2008 1
4/1/2008 2

Other functions related to QUARTER are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/dax/quarter-function-dax

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy