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.
Your code removes all filters from the financials table, but not the one on the country column, if it is there
You probably have other filters at work that are giving you blank
Try
CALCULATE( UPPER(MIN(financials[Country])), ALLEXCEPT(financials, financials[Country]),
REMOVEFILTERS ()
)If this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
This will not work. It removes the 'country' visual-level filter and then MIN() causes the measure to always result in "CANADA", or whatever country comes first alphabetically. See image.