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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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)
)
)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
7 | |
4 | |
3 |