# Display current quarter data - DAX



## Vander1981 (Jul 4, 2018)

Hey guys,

Does someone know how to dynamically display current quarter with possibility to filter for previous quarter as well in a table without month - quarter details ?

Table is like product for rows and revenue, units,.. in columns.

It does work with Calculate function like this one below : CALCULATE(SUM(Data[revenue]) ; Calendar[Quarter_nb]=3). However it is not dynamic.

When I replace number 3 with a measure calculating dynamically the number of the current quarter, it does not work.

CALCULATE(SUM(Data[revenue]); FILTER ( VALUES(Calendar[Quarter_nb]) ; Calendar[Quarter_nb] = measure ) 

Measure looks in the fact table for last date. Then extract the month and then a roundup(month/3;1) to get the quarter.

Anyone ? 

If you could explain me why the version 2 does not work. The measure displays the correct quarter when display on a card.

Thanks !!


----------



## gazpage (Jul 7, 2018)

Without seeing the actual measure for number 2 it’s hard to say. Probably your measure is being calculated in the row context of the filter, rather than of the whole table. Try including an ALL in measure for the Calendar table.


----------

