Forum Discussion
Dax: remove all filters except one
- 1 year ago
Either of these solutions will work:
This time, the issue is because you have a many-to-one relationship between BU and Employee, but the Cross-filter direction selected is 'Both'.Unless there is a very good reason, you should have only 'Single' directionality between your dimension tables and your fact tables. This is best practice.
If you do have a very good reason, then I would suggest modifying the interactions between visuals.
Select the slicer you want to not affect the visuals, then go to Format -> Edit Interactions, and turn off interactions between the slicers and the visuals that you want to ignore it.
Hello, thank you for your time and your answer.
This is kind of my bad this time because I used one table in the sample data (which is not the case for my corporate data).
- When I use only one table (like the first sample above), everything's working well when I change the filter behaviour.
- However, when I use numerous tables in a star schema, it does not seem to work. Does the calculate behaviour change depending on the cross-filter direction?
I just kept the same formula but in this new multi-table sample.
CALCULATE(
UPPER(SELECTEDVALUE(BU[Region])),
ALLEXCEPT(BU, BU[Region])
)Also, thank you for the value filter behaviour, I was not aware of a such thing 😉 .
Here is the star sample link: https://drive.google.com/file/d/1Kt2MaAvn6P8Bx5I4YXZbT09IhlZEYjiv/view?usp=sharing . For convenience purposes, I used this new sample.
Either of these solutions will work:
This time, the issue is because you have a many-to-one relationship between BU and Employee, but the Cross-filter direction selected is 'Both'.
Unless there is a very good reason, you should have only 'Single' directionality between your dimension tables and your fact tables. This is best practice.
If you do have a very good reason, then I would suggest modifying the interactions between visuals.
Select the slicer you want to not affect the visuals, then go to Format -> Edit Interactions, and turn off interactions between the slicers and the visuals that you want to ignore it.
- TheoAu1 year agoFrequent Visitor
That's it, thank your for your answer. 🙂