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.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |