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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I am looking for a dax formula to subtract the daily sold amounts from the running total to predict a date were the inventory will be empty.
Here is my current visual objects.
Here is my expectation of this formula, drawn by the purple line. For the line to start at the last transaction date then subtract the daily sold amounts and to show visually when the stock will be empty.
For information my measurments looks like this.
Avail. Inv. = BON_Items[InventoryField]-(BON_Items[Y365_Qty_on_Sales_Order]-BON_Items[Y365_Qty_on_Component_Lines])
ArtTransSumABS = SUM(Yellow_ItemLedgerEntryBI[QuantityABS])
DaysBetween = DATEDIFF(FIRSTDATE(Yellow_ItemLedgerEntryBI[PostingDate]),LASTDATE(Yellow_ItemLedgerEntryBI[PostingDate]),DAY)
Total Quant. Trans. Div by Total Trans. Days = DIVIDE([ArtTransSumABS],[DaysBetween])
For my running total formula its made from the quick measurments.
Running Total for Quantity in Date =
CALCULATE(
SUM(Yellow_ItemLedgerEntryBI[Quantity]),
FILTER(
ALLSELECTED('Date'[Date]),
ISONORAFTER('Date'[Date], MAX('Date'[Date]), DESC)
)
)
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 |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |