Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone,
I hope you are all doing great. I want to make a Measure goes blank if a slicer is selected but I am only half way there.
I have dimRegion Table as below:
RegionState RegionState ID
Region | State ID |
Region AA | 1 |
Region BB | 1 |
Region CC | 1 |
Region XX | 2 |
Region YY | 2 |
Region ZZ | 2 |
And I have StateTable which is connected to Region Table above with State ID
StateID | State |
1 | VIC |
2 | NSW |
Also, I have as staff cost table (factTable) as below.
StateID | Metric | Amount |
1 | Staff Cost | 500 |
The problem is Staff Cost is allocated on State Level and not the Region Level. So, I want to make sure that my measure
(StaffCost = sum(StaffCost[Amount]) )goes blank or 0 when someone selected Region Slicer in Power BI.
I tried using following dax
Your help will be highly appreciated.
Kind regards,
Solved! Go to Solution.
You could try using ISFILTERED(dimRegion[Region]) instead of HASONEVALUE() in your if statement.
You could try using ISFILTERED(dimRegion[Region]) instead of HASONEVALUE() in your if statement.
Exactly what I needed.
Thank you
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |