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
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
User | Count |
---|---|
213 | |
53 | |
46 | |
41 | |
41 |
User | Count |
---|---|
287 | |
209 | |
78 | |
74 | |
66 |