This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello,
Struggling with what feels like a very simple function. My data looks like the below table example. Essentially i need to create a starting inventory column and an ending inventory column. Where;
Starting Inventory = Ending Inventory of Previous Week + New inventory
Ending Inventory = Starting Inventory of Current Week less Sales for that week
Solved! Go to Solution.
This article is the key to the solution;
Hi,
Share the download link of the PBI file. Ensure there is a Calendar table with a Week starting column.
Hi,
Share the download link of the PBI file. Ensure there is a Calendar table with a Week starting column.
This article is the key to the solution;
@dswinden , You have to use a cumulative approach
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
Power BI Inventory On Hand: https://youtu.be/nKbJ9Cpb-Aw
Hi @amitchandak as always, appreciate you are usually one of the first to reply!
WOuld you mind editing that DAX for the fields in my table above? Thank you!
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 26 | |
| 23 | |
| 22 | |
| 13 |
| User | Count |
|---|---|
| 62 | |
| 47 | |
| 27 | |
| 23 | |
| 19 |