Forum Discussion
Anonymous
2 years agoNot applicable
Need Dynamic Forecast Measure
URGENT DAX Question: How do I modify this dax: Forecast = CALCULATE(SUM('Q3 Forecast'[Forecast])) such that selected value if dimTime[Fiscal Quarter]=Q2, then CALCULATE(SUM('Q2 Forecast'[Forecast])...
- 2 years ago
Hi Anonymous ,
If it's only Q2 that has a different forecast, you might be able to try this simple solution:
SWITCH( SELECTEDVALUE('dimTime'[Fiscal Quarter]), "Q2", SUM('Q2 Forecast'[Forecast]), SUM('Q3 Forecast'[Forecast]) )It could be an IF too, but I left it at SWITCH in case you wanted to check for BLANK() and have it return BLANK() if no quarter is selected.
DataZoe
2 years agoMicrosoft Employee
Hi Anonymous ,
If it's only Q2 that has a different forecast, you might be able to try this simple solution:
SWITCH(
SELECTEDVALUE('dimTime'[Fiscal Quarter]),
"Q2", SUM('Q2 Forecast'[Forecast]),
SUM('Q3 Forecast'[Forecast])
)It could be an IF too, but I left it at SWITCH in case you wanted to check for BLANK() and have it return BLANK() if no quarter is selected.
Anonymous
2 years agoNot applicable
Thanks DataZoe That worked!