Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have an issue calculating forecast accuracy (which is comparing actuals and requirements forecasted)
My base table is a forecast table, to which I add actuals in a calculated column based on Week and ID
Whenever there was no forecast, there is no record. However, it could be that there are actuals.
See example for ID 4000043 and, creation week 46 week 47 (Leadtime 1)
So this way, I do not count all the actuals and have an incomplete calculation.
Is there a way to circumvent this?
Ideally I would insert the "missing" records to the forecast table in order to have all forecast, and all actuals in one table.
The goal in the end however is comparing all the forecast from Creation week X with all the actuals in the forecasted weeks of that Creation week.
thanks a lot!
Creation Week | ID | Week | Forecast | Leadtime | Actuals |
201945 | 40000043 | 201946 | 323434 | 1 | 100000 |
201945 | 40000043 | 201947 | 323434 | 2 | 100000 |
201945 | 40000043 | 201948 | 504000 | 3 | 200000 |
201945 | 40000043 | 201949 | 937766 | 4 | 300000 |
201946 | 40000043 | 201948 | 123032 | 2 | 300000 |
201946 | 40000043 | 201949 | 504000 | 3 | 200000 |
201946 | 40000043 | 201950 | 937766 | 4 | 300000 |
Hi, @Pieter_086
Based on your description, I inserted the missing data and created data to reproduce your scenario.
You may create two measures to compare all the forecast from Creation week X with all the actuals in the forecasted weeks of that Creation week.
AllForecast =
var _currentweek = MIN('Table'[Creation Week])
return
CALCULATE(
SUM('Table'[Forecast]),
FILTER(
ALLSELECTED('Table'),
'Table'[Creation Week] = _currentweek
)
)
AllActual =
var _currentforest = MIN('Table'[week])
return
CALCULATE(
SUM('Table'[Actuals]),
FILTER(
ALLSELECTED('Table'),
'Table'[Creation Week] = _currentforest
)
)
Result:
If I misunderstand your thought, please show me your expected result. Do mask sensitive data before uploading. I am glad to solve the problem for you. Thanks.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-alq-msft ,
thanks for your quick response and yes this would solve it.
However I assume you insert missing data manually in this case.
I am looking for a way to insert any missing record (for week, ID, or creation week) as it happens all over the place.
I tried by creating a date table / masterdata table that contain all records. But then I fail to calculate the forecast accuracy for every creation week at once, as it depends on certain filters.
Would you have a better solution for this?
thanks, let me know if this is clear.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |