Forum Discussion
Dax Initial Inventory Formula
Hello, good afternoon with everyone
I have the following table where the initial stock of the next month is equal to the final stock of the previous one. Could you help me with a measure in power query please.
Thank you very much for the help.
1 Reply
- amitchandakSuper User
Syndicate_Admin , I think you have built cumulative like
example measures
Inventory / OnHand
[Intial Inventory] + CALCULATE(SUM(Table[Ordered]),filter(date,date[date] <=maxx(date,date[date]))) - CALCULATE(SUM(Table[Sold]),filter(date,date[date] <=maxx(date,date[date])))
Inventory / OnHand
CALCULATE(firstnonblankvalue('Date'[Month]),sum(Table[Intial Inventory]),all('Date')) + CALCULATE(SUM(Table[Ordered]),filter(date,date[date] <=maxx(date,date[date]))) - CALCULATE(SUM(Table[Sold]),filter(date,date[date] <=maxx(date,date[date])))Power BI Inventory On Hand: https://youtu.be/nKbJ9Cpb-Aw