Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi everyone, i am struggling to calculate a forecast and i was hoping someone here could help me.
I Have the dates for the entire month, the plan (S&OP) for the month (daily) and the accumulated plan . I also have the measures per day and the accumulated measures per day.
I was required to create two forecast, the first one i was able to do it , as the logic is based on the average of the daily actual, would be something like:
Forecast Case 1 Average:
And I used the datediff to get the column of numbers 1,2,3,4 etc. until the end of the month, and the dax i used is:
So i calculated different variables for the end of the month, the production day ( the current day of the month), etc
and then i used the logic to apply : "Actual + Average*daydiff
My problem is the forecast 2, for the S&OP when the S&OP changes, as would be:
As in this case the S&OP is different everyday, cannot apply the logic as in the case 1, and I would need to iterate/for loop in each row… and I have trying to check that for few hours and I am getting a bit stuck..
Solved! Go to Solution.
@Anonymous , Based on what I got
One of the method
Assume Actual is a measure
[Actual] + calculate(Sum(Table[S&OP]), filter(all(Table), Table[Date]<= Max(table[Date]) ) )
or actual last non blank
lastnonblankvalues(Table[Date], [Actual]) + calculate(Sum(Table[S&OP]), filter(all(Table), Table[Date]<= Max(table[Date]) ) )
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
@Anonymous , Based on what I got
One of the method
Assume Actual is a measure
[Actual] + calculate(Sum(Table[S&OP]), filter(all(Table), Table[Date]<= Max(table[Date]) ) )
or actual last non blank
lastnonblankvalues(Table[Date], [Actual]) + calculate(Sum(Table[S&OP]), filter(all(Table), Table[Date]<= Max(table[Date]) ) )
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!