Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
101 | |
90 | |
78 | |
70 | |
69 |
User | Count |
---|---|
110 | |
96 | |
95 | |
74 | |
71 |