Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

On Hand inventory (rolling)

I think I'm close but I cannot get this table calculated the way I need it.    For some reason, if there is no value in the "Outstanding Req" field, the previous month on hand calculation goes back to the beginning month (rather than the prior month).   

 

You can see this below:   In Feb there was 1659 units, a demand of 889, and so the March On Hand was 771.    April SHOULD BE showing 750  (771-21), but it is showing 1639.     It is subtracting 21 from the January amount of 1660.     How to fix?  

 

Previous Month On Hand = CALCULATE(IF(SUM(Flu_PlanPegging[Outstanding Requirement])>=0,SUM('Items (3)'[Quantity On Hand])-[Outstand Req]),DATEADD('Date Table'[Date],-1,MONTH))

 

  • I think you need to tell your filter to grab values that are less or equal to previous month so you will have a rolling value.

1 Reply

  • I think you need to tell your filter to grab values that are less or equal to previous month so you will have a rolling value.