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
annjoseph
Regular Visitor

What if parameter

I have sales table with Product Group name,Product Sub group name,Volume, Price.

I created a Matrix with Product Group name and Product Sub group in rows and volume and price in Values.Then i have created what if Parameter for volume.based on selected value in What if, Volume in matrix will change.

but i have new requiremnt, such that what if Volume for each product will vary.

Example.if i have 3 products, book, table and pen. what if volume change for book will be 5%, pen will be 10%, for pencil no change.Need to show all the variation together in a Matrix.

How can i implement above requirement?

2 ACCEPTED SOLUTIONS
v-lionel-msft
Community Support
Community Support

Hi @annjoseph ,

 

If the ratio of changes between products is fixed, then @amitchandak solution is indeed effective.

v-lionel-msft_0-1598854334135.png

Otherwise you may need to create multiple ‘What if’ parameters.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @annjoseph ,

 

v-lionel-msft_0-1599119205056.png

Measure = 
SWITCH(
    SELECTEDVALUE(Sales[CountryRegion]),
    "China", SUM(Sales[Sale 2013]) * [Parameter1 Value],
    "Germany", SUM(Sales[Sale 2013])*[Parameter2 Value],
    "United", SUM(Sales[Sale 2013])*[Parameter3 Value]
)

You need to create multiple 'What-IF' parameters, otherwise, you need use bookmark feature.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-lionel-msft
Community Support
Community Support

Hi @annjoseph ,

 

If the ratio of changes between products is fixed, then @amitchandak solution is indeed effective.

v-lionel-msft_0-1598854334135.png

Otherwise you may need to create multiple ‘What if’ parameters.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the reply. Hard coding measures wont work for our requirement.

As per our requirement, we need to find the What-If Solution for each product based on what-if parameter. I will be having one what-if parameter & when i select one product i should be able to apply the what-if condition to that product . Then, that product's value should be changed to what-if condition. Similarly I should be able to apply different what-if condition for each products based on my selection. Final results will be a table of all products selected with changed values and un-selected products with unchanged values. The whole process should be dynamic.

Hi @annjoseph ,

 

v-lionel-msft_0-1599119205056.png

Measure = 
SWITCH(
    SELECTEDVALUE(Sales[CountryRegion]),
    "China", SUM(Sales[Sale 2013]) * [Parameter1 Value],
    "Germany", SUM(Sales[Sale 2013])*[Parameter2 Value],
    "United", SUM(Sales[Sale 2013])*[Parameter3 Value]
)

You need to create multiple 'What-IF' parameters, otherwise, you need use bookmark feature.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

pranit828
Community Champion
Community Champion

HI @annjoseph 

Create new paramertes to get what if % increase and use it in a measure to and display it.

Checkl the below link.

https://www.youtube.com/watch?v=iiNDq2VrZPY

 





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile
amitchandak
Super User
Super User

@annjoseph , you can have more than one whatif or /with a measure like this

 

new measure =
switch ( true(),
FIRSTNONBLANK(Table[Product],"NA") ="book" , [Measure] * selectedvalue(param[param]),
FIRSTNONBLANK(Table[Product],"NA") ="table " ,[Measure] *selectedvalue(param[param]) *2 ,
/// Add more conditions
[Measure]
)

 

new measure =
switch ( true(),
FIRSTNONBLANK(Table[Product],"NA") ="book" , [Measure] * selectedvalue(param1[param1]),
FIRSTNONBLANK(Table[Product],"NA") ="table " ,[Measure] *selectedvalue(param2[param2]) ,
/// Add more conditions
[Measure]
)

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.