Forum Discussion
Inventory Forecast Recursive Calculation
Hi all, I'm trying to create a DAX measure that populates "forecasted remanining inventory".
I have gone through Gerhard's blog on recursive calculation, but it talks about compound interest and not summation.
In Gerhard's blog, he replied in one of the comments saying it "should be easy" but I haven't been able to figure it out for 3 days already.
I have gone through this thread but I don't understand what the user wrote, nor the answer derived.
My attempt is:
Forecast Inventory =
VAR PrevInv = CALCULATE ( SUMX(Table, Table[Inventory]), DATEADD( DateTable[Dates], -1, MONTH))
RETURN
IF ( ISBLANK ( Table[Inventory] ) ,
PrevInv - SUMX(Table, Table [Sales]),
SUMX(Table, Table [ Inventory] )
I know that the "PrevInv" variable is not calculated correctly but I really don't know how else to proceed. Can anyone please help?
Assume that a DateTable has been created separately and is configured properly.
Thank you!
15 Replies
- AnonymousNot applicableAnyone? Please help...
- InterkoubessSolution Sage
Hi Anonymous,
With the printscreen what are your expected outcomes?
Please give the dummy data( easy to manipulate, not a printscreen) as well as your expected results and then i can m ake a try...
Ninter
- AnonymousNot applicable
This is the expected outcome
This is the file with dummy data:
https://www.dropbox.com/s/wc30mt5kron382t/Inventory%20Recursive%20Calculation.pbix?dl=0