Forum Discussion
FILTERS() function in dax
Hi,
Greg_Deckler Anonymous
What does FILTERS function and ALLSELECTED doing here:
where do we have to use FILTERS function?can i remove below FILTERS() function
CALCULATE(DISTINCTCOUNT(vwFact[Id])
,FILTERS(vwDate[Date])
,FILTER(ALLSELECTED(vwDim), vwDim[Type]="AA" )
,vwFact[pr]="Eng"
)
or
Whats the FILTERS() achieving here:
Testmeasure:= CALCULATE(
DISTINCTCOUNT(vwFact[Id]),
FILTERS(Date[Date])
)
Hi jatneerjat,
After the Filter, A Boolean expression that is to be evaluated for each row of the table.
So in your formulas, for the first one. you cannot remove the filter. For the second, you can update it to the one as below directly.
measure/column= CALCULATE( DISTINCTCOUNT(your table [Columnname]),)
For more detais, please can refer to the online document.
Regards,
Frank
1 Reply
- v-frfei-msftCommunity Support
Hi jatneerjat,
After the Filter, A Boolean expression that is to be evaluated for each row of the table.
So in your formulas, for the first one. you cannot remove the filter. For the second, you can update it to the one as below directly.
measure/column= CALCULATE( DISTINCTCOUNT(your table [Columnname]),)
For more detais, please can refer to the online document.
Regards,
Frank