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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

What if parameters help please

Hi all,

 

I have a sales forecast table by country that I would like to be able to combine with What If parameters, so that the Global head of sales can calculate the results if individual countries increased their sales e.g. 

CountrySales ForecastSales IncreaseTotal
USA10010110
UK90999
Canada801595
France701282

 

What I would like is that the Sales Increase value can be entered using a What If parameter that the Global head can change dynamically for each country

 

I would greatly appreciate any/all help that you can give.

 

Thanks

 

Andrew

1 ACCEPTED SOLUTION

Hi, @Anonymous 

Try measure as below after you have created 4 seperate What If measures.  

Sales Increase = 
SWITCH (
    SELECTEDVALUE ( 'Table'[Country] ),
    "USA", 'Parameter USA'[Parameter USA Value],
    "UK", 'Parameter UK'[Parameter UK Value],
    "Canada", 'Parameter Canada'[Parameter Canada Value],
    "France", 'Parameter France'[Parameter France Value]
)
Sales Increase2 =
SUMX ( VALUES ( 'Table'[Country] ), [Sales Increase] )
Total =
SELECTEDVALUE ( 'Table'[Sales Forecast] ) + [Sales Increase2]

 

19.png

 

 

Best Regards,
Community Support Team _ Eason
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

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , You need to create measures like

 

measure =
var _sel = selectedvalue(whatif[value])
return
sumx(filter(values(Country[Country]), [Sales] >_sel ),[sales])

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi, and thank you very much for your reply.

 

I have created a measure using your formula above and when I try to add it to my table it applies the measure to all the countries. What I am trying to do is have 4 seperate What If measures - 1 per country, so that the table will have Country X Forecast + Country X Parameter, Country Y Forecast + Country Y Parameter etc. and show them on one Table visualisation.

 

I don't know if this is possible but I would appreciate your help.

 

Thanks again.

 

Andrew

Hi, @Anonymous 

Try measure as below after you have created 4 seperate What If measures.  

Sales Increase = 
SWITCH (
    SELECTEDVALUE ( 'Table'[Country] ),
    "USA", 'Parameter USA'[Parameter USA Value],
    "UK", 'Parameter UK'[Parameter UK Value],
    "Canada", 'Parameter Canada'[Parameter Canada Value],
    "France", 'Parameter France'[Parameter France Value]
)
Sales Increase2 =
SUMX ( VALUES ( 'Table'[Country] ), [Sales Increase] )
Total =
SELECTEDVALUE ( 'Table'[Sales Forecast] ) + [Sales Increase2]

 

19.png

 

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Fantastic! This does exactly what I was trying to do. Thank you so much.

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!