Forum Discussion
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.
| Country | Sales Forecast | Sales Increase | Total |
| USA | 100 | 10 | 110 |
| UK | 90 | 9 | 99 |
| Canada | 80 | 15 | 95 |
| France | 70 | 12 | 82 |
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
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]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.
4 Replies
- amitchandak
Super User
Anonymous , You need to create measures like
measure =
var _sel = selectedvalue(whatif[value])
return
sumx(filter(values(Country[Country]), [Sales] >_sel ),[sales])- AnonymousNot 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
- v-easonf-msft
Community Support
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]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.