Forum Discussion
Kevin454
2 years agoNew Member
Starting and Ending Balance
I am trying to create the following in power bi. Current date. I have inventory on hand(starting balance)-requirements+po=ending balance Next day. Previous days ending balance needs to be the start...
amitchandak
Super User
2 years agoKevin454 , You need to create cumulative measures. Take the first inventory and rest need to build on
example
Inventory / OnHand
CALCULATE(firstnonblankvalue('Date'[Month],sum(Table[Intial Inventory])),all('Date'))
+ CALCULATE(SUM(Table[Ordered]),filter(all(date),date[date] <=maxx(date,date[date])))
- CALCULATE(SUM(Table[Sold]),filter(all(date),date[date] <=maxx(date,date[date])))
Power BI Inventory On Hand: https://youtu.be/nKbJ9Cpb-Aw