This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello,
I'm new to Power BI and working to leverage a What If Parameter(0-100%) to apply a factor to a subset of my Forecast data. The DAX for my measure is as follows:
| What If Parameter set at 50% (Opp Name Added to Columns) What if applied to Opportunity One Only | |||
| Year | Forecast | Adjusted Forecast | OpportunityName |
| 2022 | $363,447 | $363,447 | Opportunity Two |
| 2022 | $13,560,915.72 | $6,780,457.86 | Opportunity One |
| 2023 | $491,741 | $491,741 | Opportunity Two |
| 2023 | $24,821,919.65 | $12,410,959.83 | Opportunity One |
| What If Parameter set at 50% (Opp Name Removed from Columns) What if applied to Opportunity One and Two. | |||
| Year | Forecast | Adjusted Forecast | Desired Adjusted Forecast |
| 2022 | $13,924,362.72 | $6,962,181.36 | $7,143,905.00 |
| 2023 | $25,313,660.65 | $12,656,830.33 | $12,902,701.00 |
Solved! Go to Solution.
Hi @v-yalanwu-msft,
Thanks for the reply. I was able to work through this with the following approach. This provides me the ability to apply the What If Parameter to selected Opportunities and combine the selected Opportunity cost with the non-selected cost at the year/aggregate level.
Measure for Total Cost
Measure for the Selected Opportunity Cost
Hi, @walkersw ;
Because measures are created based on row contexts, if you remove the [OpportunityName] column, the row level of [OpportunityName] is missing;
MAX('Financials_8_31_22'[OpportunityName]) in your formula can be imagined to be "Opportunity Two", because "Opportunity Two" >Opportunity One", so the first condition is not met, so the result is SUM('Financials_8_31_22'[Forecast]).
So the best way is to put [OpportunityName] on the value to distinguish OpportunityName.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you, @v-yalanwu-msft . Is there a way to apply my What If parameter to only one of the opportunities, while displaying the data at the year-level? When I switch my visualizations to a year summary (line chart or table) the What If parameter is being applied to both Opportunities.
Hi, @walkersw ;
Sorry I don't understand what you mean, can you have a scenario to illustrate it?
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yalanwu-msft,
Thanks for the reply. I was able to work through this with the following approach. This provides me the ability to apply the What If Parameter to selected Opportunities and combine the selected Opportunity cost with the non-selected cost at the year/aggregate level.
Measure for Total Cost
Measure for the Selected Opportunity Cost
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 23 | |
| 23 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 63 | |
| 38 | |
| 25 | |
| 23 | |
| 22 |