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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AishwariyaV
Helper IV
Helper IV

Multiple what if based on selection

Hey guys,

I am currently working on a scenario in power bi.

I have implemented what if analysis with a sample dataset. 

I am considering "Product Quantity" as a what if parameter, which answers the question, "What happens to my sales if i increase/decrease my quantity ".

My requirement is, when i select a particular product name i should be able to get a what if slicer for that product name.

And when i select another product name i should get another what if slicer for the second selected product. 

i.e;

I should have mutiple what if slicers for each products that has been selected. And the maximum selection allowed must be 4 or 5.

 

Hope someone would help me out with this!

1 ACCEPTED SOLUTION

Some thing like this, or combine using the switch

measure =
var _max = maxx(whatifcond,whatifcond[whatifcond])
return
calculate(sum(table[revenue]), filter(table[category] ="Condiments"))*_max
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

You have used is the filter and then check the value

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

 

like

if(isfiltered(product[product]) &&max(product[product]) ="ABC",

 

Or use Switch( True(),

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

hi @amitchandak ,

community.PNG

This is how I want.

 

Couldn't achieve this in Power BI.

Some thing like this, or combine using the switch

measure =
var _max = maxx(whatifcond,whatifcond[whatifcond])
return
calculate(sum(table[revenue]), filter(table[category] ="Condiments"))*_max
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.