Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
88 | |
83 | |
64 | |
49 |
User | Count |
---|---|
127 | |
108 | |
87 | |
70 | |
66 |