Forum Discussion
What If Parameter Help
Hey,
you have to provide three What-if parameter, one for each province.
Additionally you have to adjust you calculation, checking if one province is selected (in this case it just means used on rows), using this
IF(HASONEVALUE('yourtable'[Province]),
var valueFromWhatIfParameter =
SWITCH('yourtable'[Province]
,"NB", get the value from that what-if parameter
,"NL", ...
,0
)
return
CALCULATE(something using valueFromWhatIfParameter )
)Hope this gives you an idea how to tackle your requirement.
Regards
Hi TomMartens,
First of all, thank you for helping me.
I tried this
Budget%Margin = IF(HASONEVALUE(CRM_Dim_Projects[Province]),
var valueFromWhatIfParameter =
SWITCH(VALUES(CRM_Dim_Projects[Province])
,"NB", NB[NB Value]
,"NS", 'CM%'[CM% Value]
,0
)
return
CALCULATE(AVERAGE(CRM_Fact_SalesOpportunities[Budget%Margin])+valueFromWhatIfParameter )
)But it doesn't work. Could you have a look at my codes and tell me what is wrong please?
- TomMartens9 years agoSuper User
Hey,
currently I have no idea, but please have a look at the solution from Vvelarde it uses a similar approach, maybe you can adapt to his approach.
Regards
- v-huizhn-msft9 years agoMicrosoft Employee
Hi Anonymous,
>>Thus far we have only been able to impact the entire Budget % Margin column, rather than focusing in on one margin adjustment.
Could you please explain this requirement in details? And share your sample table to test if I have any idea?
Best Regards,
Angelia