Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe 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.
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
Solved! Go to 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]
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.
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]
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.
Fantastic! This does exactly what I was trying to do. Thank you so much.