Forum Discussion
vjnvinod
Impactful Individual
1 year agoCumulative forecast DAX support
hi All, i need a cumulative forecast, from the time where my actuals Ends, as you can see from the below My current dax is not showing the right output for the month of november it should ...
grazitti_sapna
Super User
1 year agoHi vjnvinod ,
Your Cumulative Forecast isn't calculating correctly. It's starting from the beginning of the year instead of the last month with actual data. We'll adjust the formula to fix this, ensuring accurate calculations for November and December. revised DAX:
Cumulative Forecast DAX
Cumulative Forecast =
VAR LastActualMonth =
CALCULATE(
MAX('GroupOPEXCAPEX'[DateColumn]),
FILTER(
ALL('GroupOPEXCAPEX'),
[Actuals] > 0
)
)
RETURN
IF(
[Actuals] = 0,
CALCULATE(
SUM('GroupOPEXCAPEX'[Value]),
FILTER(
ALLSELECTED('GroupOPEXCAPEX'),
'GroupOPEXCAPEX'[DateColumn] > LastActualMonth &&
'GroupOPEXCAPEX'[DateColumn] <= MAX('GroupOPEXCAPEX'[DateColumn]) &&
'GroupOPEXCAPEX'[Actual/Budget] = "Forecast"
)
),
BLANK()
)
Explanation:
We're figuring out the last month where we have actual data. Then, we're adding up all the forecast values from that month onwards. To avoid double-counting, we're only showing the forecast for months without actual data.
If I have resolved your question, please consider marking my post as a solution. Thank you!