Forum Discussion
Filtering a measure in DAX
Hi,
The most straight-forward way is to use slicer pane:
Additionally you can create dynamic filtering using many different methods. E.g. using a filter measure and an iput table:
Dax:
End result:
By selecting different values in the new slicer the filter logic of the table changes.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
hi ValtteriN ,
I need to use this measure in various visuals, which means the filtering has to be in a DAX. I think making a dynamic filter in the way you are thinking would make me have to add all the visuals to the filter. My idea was to sort out all the zeros in a new DAX and use this DAX instead of the other one.
But thank you for sharing your idea. Let me know if you have any new ideas :-).
- ValtteriN3 years ago
Community Champion
Hi,
If you want a to apply filter logic to all your visuals you can create a calculation group referencing the filter measure:Global 0 filter = IF([Measure 35]>0,1,0)
calculate(selectedmeasure(),FILTER('Table (18)',[global 0 filter] = 1))
Now we can apply this to all pages and it will work without applying it to a visual:
You can also use the filtering logic within a calculation group to apply it to multiple measures.
calculate(selectedmeasure(),FILTER('Table (18)',[Measure 35]>0))