Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello everyone,
I have a table that looks like this:
This table is currently filtered on article (first column). Within this filter I want to have a measure which calculates the inventory based on the required quantity of each row. The inventory is currently 17.992 so, based on the first row in the table, the new inventory number should be 17.992 - 30.000 = -12.008. So far so good. However, the calculated inventory on the second row should be -12.008 - 84.000 = -96.008. What it does now, is look back at the at the starting inventory (17.992) and use that to calculate the new value, instead of using the calculated inventory from the new row. The first 4 rows should look like this (ignore the top most row seeing I've put the inventory there for better understanding):
Hi @RDinho
You can refer to the following example
Measure=
var _suminven=17992
return CALCULATE(_suminven-SUM(Articlelines[Required Quantity]),FILTER(ALL(Articlelines),
Articlelines[Startdate] <= SELECTEDVALUE(Articlelines[Startdate]) &&Articlelines[Status] = "Open" &&Articlelines[Artikelnummer] = SELECTEDVALUE(Artikelregels[Artikelnummer])))
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 10 |