Hi All,
I’ve been asked to calculated a forward inventory projection that does not go into negative stock, i.e. when the cumulative stock movement total is less than or equal to zero the stock on hand should be zero.
We want the forecast to reflect what is physically in our DC so when something gets to zero then three days later we receive 1000 units, stock should be 1000 and not subtract the daily forecast for those days. This is what my current report is doing.
The above shows the straight cumulative projection which is just a SUM of the Expected Change measure. Technically correct, however, we need to eliminate the negative SOH.
I’ve got it to a stage where if the previous day’s total is <= 0 then add 0 + Expected Change, usually the daily forecast. I’m okay with that.
The issue I have is the day after a positive change,as you will see around 22/4/22 is when there is a positive change of 2244 but then next day it drops right down to 645 when all I want to see is 2088 (2244 - 156).
Here are the two measures:
Cumulative Projection = CALCULATE( [Expected Change],
FILTER( ALLSELECTED( Dates[Date] ),
Dates[Date] <= MAX( Dates[Date] ) ) )
Modified SOH Projection =
VAR ExpectedChange = CALCULATE( [Expected Change],
FILTER(
ALL( Dates ),
Dates[Date] <= MAX( Dates[Date] )
)
)
VAR LatestChange = CALCULATE( [Expected Change],
FILTER(
ALL( Dates ),
Dates[Date] = MAX( Dates[Date] )
)
)
VAR ExpectedChange_1 = CALCULATE( [Expected Change],
FILTER(
ALL( Dates ),
Dates[Date] < MAX( Dates[Date] )
)
)
VAR SOHProjection = SWITCH( TRUE(),
ExpectedChange_1 <= 0,
0 + LatestChange,
ExpectedChange_1 + LatestChange )
return
SOHProjection
I am stumped! I’m sure there has to be a simpler way but I just cannot solve this. Please help!!
I have attached a super dumbed down pbix file which should be enough to solve the issue.
Sample Projected SOH.pbix (134.5 KB)
Thanks so much in advance!