Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello Power BI Community,
I need help with creating measures that can control the displaying of data in my dashboard.
I have data with 4 filters on it. These filters come from 4 different dimension tables in my datamodel. When one of the filters is selected, doesn't matter which one, i need the main data table to filter on a binary variable that divides the data into two diffent sections. Lets call that my dummy.
So, if filter A or filter B or filter C or filter D is selected, then i need it to show the data where dummy = 0.
And if no filter is selected, i need it to show the data where dummy = 1.
I have allready created 4 measures that returns TRUE if the filter is selected. I figured this was step one, but I can't seem to move any futher.
I really hope someone can help me!
Best regards
To achieve the desired behavior in Power BI using DAX measures, you can follow these steps:
Step 1: Create Measures for Filter Selection You mentioned that you have already created measures that return TRUE if the filters are selected. If you haven't done so, you can create these measures. For each filter (A, B, C, D), create a measure like this:
IsFilterASelected = NOT(ISBLANK(SELECTEDVALUE(DimensionTableA[FilterColumnA])))
Repeat this for filters B, C, and D, changing the table and column names accordingly.
Step 2: Create a Dummy Measure Create a measure that calculates the value of the "dummy" variable based on the filter selections. The measure should return 0 if any of the filter measures return TRUE; otherwise, it should return 1. You can use the following DAX expression:
Dummy = IF([IsFilterASelected] || [IsFilterBSelected] || [IsFilterCSelected] || [IsFilterDSelected], 0, 1)
This measure checks if any of the filter measures are TRUE. If at least one of them is TRUE, it returns 0; otherwise, it returns 1.
Step 3: Use the Dummy Measure in Your Visuals Now, you can use the "Dummy" measure in your visuals. When no filter is selected, the "Dummy" measure will return 1, and your data will show where dummy = 1. When any of the filters are selected, the "Dummy" measure will return 0, and your data will show where dummy = 0.
Simply add the "Dummy" measure to the filter area of your visualizations, and it will control the display of data based on your filter selections.
With these measures in place, your Power BI dashboard should work as you described, showing the appropriate data sections based on filter selections.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Thankyou so much for your nice reply.
I guess I didn't explain myself well enough. The dummy I was talking about is already a column in my main data table.
Can I connect the dummy-measure you talk about to my dummy column?
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |