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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

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))

 

on hand.png

1 ACCEPTED SOLUTION
dustinn
Resolver I
Resolver I

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.

E8n9LCh

View solution in original post

1 REPLY 1
dustinn
Resolver I
Resolver I

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.

E8n9LCh

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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