Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Kevin454
New 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 starting balance. Then Starting balance-requirements+po=ending balance. I need this pattern. The current day works , but I am having trouble for the following date starting balance being previous day ending balance. How can I make this work. I am using a matrix table, with item in rows, date in columns, and inv,requirements,po in the value columns.

 

 2024-01-16   2024-01-17   2024-01-18   
ItemInv Start BalanceRequirementPOFinal BalanceInv Start BalanceRequirementPOFinal BalanceInv Start BalanceRequirementPOFinal Balance
A10020501301304010100100901020
B            
C            
D            
1 REPLY 1
amitchandak
Super User
Super User

@Kevin454 , 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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.