Forum Discussion
smallfires0628
2 years agoHelper I
Measure not affected by Filter
I have a measure with the following code: Total Containers = sum('Booking List'[Containers]). It isn't affected by any filters I apply for the visuals, the amount stayed the same.
- Anonymous2 years ago
You can use crossfilter() function.
e.g The column between the tables to connect is named a.
Total Containers = CALCULATE ( SUM ( 'Booking List'[Containers] ), CROSSFILTER ( 'Booking List'[a], 'table'[a], BOTH ) )Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PijushRoy
2 years agoCommunity Champion
Hi smallfires0628
Please use REMOVEFILTER in your measure
Like (say you are using Product name in your slicer and you want to turnoff the filter)
so your measure like
Total Containers = Calculate(sum('Booking List'[Containers]),REMOVEFILTERS(YourTable[Product]))
https://learn.microsoft.com/en-us/dax/removefilters-function-dax
Let me know if that works for you
If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.
Thanks
Pijush
Linkedin