Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jatneerjat
Helper V
Helper V

FILTERS() function in dax

Hi,

 

@Greg_Deckler  @Seth_C_Bauer

 

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])

                                                               )

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community 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

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

1 REPLY 1
v-frfei-msft
Community Support
Community 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

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.