Power BI DAX DATESQTD function

The Power BI DATESQTD function is one of the DAX Date and Time functions useful to return a table that contains a continuous dates for the quarter to date. For the DATESQTD function, you can use the column that contains date/time value. Otherwise, use the table expression that returns a single column as the parameter.

This article explains the POWER BI DAX DATESQTD function that accepts the dates value and uses the current context to return a column of dates for the quarter to date and the syntax is shown below.

DATESQTD(<dates>)

Power BI DAX DATESQTD function Example

The below expression uses the FactInternetSales table OrderDate column to create a table with dates for the quarter. 

Table = DATESQTD(FactInternetSales[OrderDate])

To demonstrate the DAX DATESQTD() function, click the New Measure button on the Modeling Tab and rename it as RunSalesQTD. The below expression calculate the sum of the Sales Amount in the FactInternetSales table for each quarter. Here, we used the CalendarTable generated by the CALENDAR function. 

If we add the below expression to the table it will calculate the running total for each quarter of the Order date and restarts at next quarter. Please check the Qtr 1 and Qtr 2 in the below table report. Please refer to the DateTime and function article for the remaining Power BI methods. For more Charts >> Click Here.

RunSalesQTD = CALCULATE(SUM(FactInternetSales[SalesAmount]), DATESQTD(CalendarTable[Date]))
POWER BI DAX DATESQTD Function 1

In the below expression, we used the FILTER method to restrict the use of DATESQTD for the first quarter. This formula calculates the running total of the first quarter in each calendar year.

RunSalesQTDQtr1 = CALCULATE(SUM(FactInternetSales[SalesAmount]), DATESQTD(CalendarTable[Date]), FILTER(CalendarTable, CalendarTable[Date].[Quarter] = "Qtr 1"))
POWER BI DAX DATESQTD Function 2