Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Pieter_086
New Member

"Missing" records in table

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 WeekIDWeekForecastLeadtimeActuals
201945400000432019463234341100000
201945400000432019473234342100000
201945400000432019485040003200000
201945400000432019499377664300000
201946400000432019481230322300000
201946400000432019495040003200000
201946400000432019509377664300000
2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hi, @Pieter_086 

Based on your description, I inserted the missing data and created data to reproduce your scenario.

a1.png

 

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:

a2.png

 

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.