Forum Discussion
mmossy
1 year agoRegular Visitor
Forecasted Inventory while staying above zero if negative
I currently have an issue with trying to forecast my stock on hand by SKU by month. I have my current SOH by SKU as well as forecasted sales & purchases which i have summarised into a net movements ...
- 1 year ago
Try
Forecasted SOH = VAR CurrentDate = MAX ( 'Date'[Date] ) VAR Result = SUMX ( 'Product', VAR ForecastValue = CALCULATE ( SUM ( Forecast[Net forecast movements] ), 'Date'[Date] <= CurrentDate ) VAR Total = 'Product'[Stock on hand] + ForecastValue VAR Result = MAX ( Total, 0 ) RETURN Result ) RETURN Result
johnt75
1 year agoSuper User
Try
Forecasted SOH =
VAR CurrentDate =
MAX ( 'Date'[Date] )
VAR Result =
SUMX (
'Product',
VAR ForecastValue =
CALCULATE (
SUM ( Forecast[Net forecast movements] ),
'Date'[Date] <= CurrentDate
)
VAR Total = 'Product'[Stock on hand] + ForecastValue
VAR Result =
MAX ( Total, 0 )
RETURN
Result
)
RETURN
Result