Forum Discussion
Rolling average forecast
Hi,
I received great assistance on this thread however, I can't figure out how to use the solution to create the forecast I desire in future months.
The DAX I have used is marked as the solution in the above link. The next step and ultimate goal is to forecast WIP consumption using historical consumption as an indicator (see below picture and highlights for indication of chart and using historical WIP).
The card view is the rolling figure which I'd like to use in the future months highlighted - it is dynamic so it picks up fluctuations in the past 6 month period.
I've tried using this method but it keeps spitting back a number of different errors but it's effectively what I'm trying to achieve for WIP, not sales https://blog.enterprisedna.co/forecasting-techniques-in-power-bi-by-using-dax/
Any help is greatly appreciated!
16 Replies
- lbendlinSuper User
Would you mind mentioning the errors you are experiencing?
- WhitneyHelper II
Hi, to get my total WIP hours, I tried to use:
Total WIP hours =
CALCULATE(SUM('Tracking Sheet'[Build Hours]),[Powertrain_WIP_Relative]="WIP")
and it spits back "A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed."- lbendlinSuper User
Are you on the latest Power BI Desktop ? I thought that logic limitation had been lifted recently.
- v-xulin-mstfCommunity Support
Hi Whitney,
Try measure as:
Total WIP hours = sumx(filter('Table',[Powertrain_WIP_Relative]="WIP")),'Tracking Sheet'[Build Hours])Best Regards,
LinkIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- WhitneyHelper II
v-xulin-mstf thanks, this worked for the first calculation however, I'm now getting this error for the WIP forecast:
'an invalid numeric representation of a date value was encountered'Total WIP Forecast =IF(ISBLANK([Total WIP Hours]),CALCULATE([Total WIP Hours],SAMEPERIODLASTYEAR('IDW DimDate'[Date])),BLANK() )however, my Date is a date value- v-xulin-mstfCommunity Support
Hi Whitney,
Please check:
Does your date column contain an irregular date format? For example 'Year 9999'.
If the issue persists, you can abandon the time-intelligent function and use the time function instead.
Best Regards,
LinkIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.