Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
Hi,
I am interested in creating a DAX measure that displays a dynamic value, changing according to its visual filter. Would it be possible to make this measure impervious to all the other filters (including the slicers selected by the user) ?
Let's take an example of sample data:
I have a short table showing a measure result "CANADA" because its visual filter is on Canada.
However, when I select a slicer value (in the screenshot, a value from the sales field), the measure can go blank if the country is not related to the slicer.
How to avoid the measure from going blank, and more precisely how to clear all filters (including the sales slicer) except the visual filter that allows us to show the country we want ?
CALCULATE(
UPPER(MIN(financials[Country])),
ALLEXCEPT(financials, financials[Country])
)Unfortunately, this code is not solving the problem. I still have blank values. Why?
Here is the dashboard sample I used: https://drive.google.com/file/d/1caFLlg3Y5_3yhyoSd6aRg4HNXghhiWvn/view?usp=sharing . Thanks !
Solved! Go to Solution.
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.
Hi @TheoAu
Your measure just needs to be a bit more specific, try this:
CALCULATE(
UPPER(MIN(financials[Country])),
REMOVEFILTERS(ALL(financials)),
KEEPFILTERS(financials[Country])
)
REMOVEFILTERS(ALL(financials)): Clears all filters on the financials table, including those coming from slicers or relationships.
KEEPFILTERS(financials[Country]): Re-applies only the filter from the visual context.
I hope this helps, please give a thumbs up and mark as solved if it does, thanks!
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.
This is happening because the data is all coming from a single table. This is a common issue that 'breaks' the expected behavior of ALL, ALLEXCEPT etc.
You need to go to the data model and select "Independent" for the Value Filter Behavior of this table (See below image).
Also, as a minor point, I would modify the DAX to this. It's not that MIN doesn't work, it's just that using MIN in this case might be confusing to the person maintaining the report. SELECTEDVALUE() makes more sense.
I have attached the .pbix report. Please mark this reply as the solution if it works for you! Thank you.
Here is a video explaining this issue:
https://www.youtube.com/watch?v=gTZ8YKW425s
And here is an article on Value Filter Behavior, if you want to do a deep dive into the mechanics.
https://learn.microsoft.com/en-us/power-bi/transform-model/value-filter-behavior
///Mediocre Power BI advice, but it's free///
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).
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.
That's it, thank your for your answer. 🙂
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!