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

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.

Reply
cosmicyes
Helper II
Helper II

Toggle the value of a measure to 0

Hello all,

 

I need some help on this idea.

Let´s say I have a measure that calculates some money. Let´s say it shows 100,000$.
Now I want the user of the report to be able to toggle this measure to 0$ - just to see what would happen to other measures if this certain measure was 0.

 

The user could use a slicer or a filter to toggle the value to 0 and (in this example) back to 100,000$.

 

I do not have the right initial idea how to achieve this 😞

 

Thank you in advance for any ideas!

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

4 REPLIES 4
FreemanZ
Super User
Super User

yes, in such cases, what-if parameter saves the day.

https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-what-if

It really saved my day 🙂
Created a what-if parameter with just two states: 0(%) and 100(%).
Then I multiply my measure with the selected state of the what-if-parameter.
Thank you!

amitchandak
Super User
Super User

@cosmicyes , Create a table with two values  Actual , hide

 

Then You can have measure

 

meausre new = if(selectedvalue(Table[Show]) = "hide",0, [Measure])

 

 

You can use old measure slicer approach or field parameter too with a measure having value =0

 

How to create a Measure Slicer: https://youtu.be/b9352Vxuj-M

 

Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE

@amitchandak 

Thank you, I will check both approaches.

May I ask you: what would you recommend? Measure Slicer or Field Parameters?
I have heard about Field Parameters and think this is "the future"?

Thank you again in advance

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors