Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
shekhar_shres
Advocate II
Advocate II

Return Blank Value if a Slicer is selected

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

RegionState ID
Region AA1
Region BB1
Region CC1
Region XX2
Region YY2
Region ZZ2

 

And I have StateTable which is connected to Region Table above with State ID

StateIDState
1VIC
2NSW


Also, I have as staff cost table (factTable) as below.

StateIDMetricAmount
1Staff Cost500

 

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

StaffCostDynamic = IF(HASONEVALUE(dimRegion[Region]),blank(), [StaffCost]))

So far, the above dax works if someone selects only one Region (Say Region AA) in the slicer. but as soon as someone selects two Region in the Slicer (Say Region AA and Region BB) then the actual value appears (In our example $500). 

What dax should I write to ensure that the StaffCostDynamic Measure goes blank when someone selected Region Slicer. 


Your help will be highly appreciated. 

Kind regards,






1 ACCEPTED SOLUTION
vicky_
Super User
Super User

You could try using ISFILTERED(dimRegion[Region]) instead of HASONEVALUE() in your if statement.

View solution in original post

2 REPLIES 2
vicky_
Super User
Super User

You could try using ISFILTERED(dimRegion[Region]) instead of HASONEVALUE() in your if statement.

Exactly what I needed.


Thank you

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.