Forum Discussion

Josh_BI_UK's avatar
Josh_BI_UK
Helper II
8 years ago
Solved

DAX Function which Ignores User Filter

How do I ensure a total figure is not affected by any filters selected by the user. I know I could use “Edit interactions” and switch of the filter interaction for the visual; however I would like to...
  • Anonymous's avatar
    Anonymous
    8 years ago

    To acheive this with dax you will want to use the ALL() function within a CALULATE().

     

    With your measure [TOTWrkshop. Sch] measure you will want to modify it from 

     

    DISTINCTCOUNT ( Workshops[ID] ) 

     

    to

     

    CALCULATE ( DISTINCTCOUNT ( Workshops[ID] ), ALL ( Workshops ) )

     

    This will mean that any filter coming from within the workshops table will be removed.

    This is assuming that you only have one table, if you have multiple tables then you may have to add more ALL statements depending on the model structure.

     

    I hope this helps