Forum Discussion
How to have Initial Inventory (Earliest Date Values)+Production-Sales=Remaining Inv. (Matrix Table)
Hello amitchandak !
For some reason, I'm getting the error below:
pa2021 , my mistake, try like
calculate(sum(Table[intial Inventory]), filter(Table, Table[Date] = calculate(min(Table[date]), allexcept(Table, Table[product]))))
- CALCULATE(SUM(Table[Production Qty]),filter(allselected(Table),Table[Date] <=max(Table[Date])))
+ CALCULATE(SUM(Table[Sales Qty]),filter(allselected(Table),Table[Date] <=max(Sales[Date])))
- pa20215 years agoFrequent Visitor
Hi again amitchandak ,
Not certain if this is too much to ask, but here's the output:
The findings:
It's summing initial inventory with itself, giving a doubled result.
It doesn't show Production, Sales and Remaining Inventory for each day. Instead, it gives a total.
Would it be possible to have these 3 columns for each day, besides Initial Inventory, just like to goal below?
- amitchandak5 years agoSuper User
pa2021 Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- pa20215 years agoFrequent Visitor
Here it is, amitchandak !
Link to download the file:
https://drive.google.com/file/d/1YE2mSPGgvG2Dhyi4alzTbWyNVTPTXvp9/view?usp=sharing
Appreciate your time!