Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

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])...
  • DataZoe's avatar
    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.