Short answer: inventory turnover = cost of goods sold in a period / average inventory value at cost in that period. With 8.0M of COGS in a year and an average stock of 1.6M, stock turns 5 times a year. Days of inventory (DIO) = 365 / turnover = 73 days: the average item waits 73 days on the shelf. Compute it per product or category to find slow movers, and list dead stock (no sales in, say, 180 days) separately.
Stock is cash on shelves. Higher turnover frees cash and reduces write-offs; too high causes stock-outs. Turnover by product shows where the cash sits.
How is it calculated?
| Category | COGS | Average inventory | Turnover | Days of inventory |
|---|---|---|---|---|
| Fresh | 2,400 | 100 | 24.0 | 15 |
| Drinks | 1,800 | 300 | 6.0 | 61 |
| Household | 2,000 | 500 | 4.0 | 91 |
| Electronics | 1,800 | 700 | 2.6 | 142 |
| Total | 8,000 | 1,600 | 5.0 | 73 |
Electronics turns slowly and earns a low margin: the first place to cut stock. Household turns slowly but earns more, which can justify it.
What is the DAX?
Inventory comes as snapshots (one row per product per month end, or per day) with Quantity and Value at cost. Stock is a balance, so an average over the period's snapshots, not a sum:
COGS = SUM ( Sales[Cost] )
Inventory Value = SUM ( Inventory[Value] )
Average Inventory =
AVERAGEX (
VALUES ( 'Date'[Year Month] ),
CALCULATE ( [Inventory Value], LASTDATE ( 'Date'[Date] ) )
)
Inventory Turnover = DIVIDE ( [COGS], [Average Inventory] )
Days of Inventory = DIVIDE ( COUNTROWS ( 'Date' ), [Inventory Turnover] )AVERAGEX over months with LASTDATE takes each month's closing stock and averages them. If snapshots are only at month ends, use the last date with data (LASTNONBLANK) instead of the calendar's last date. Days of Inventory uses the days in the selected period, so it works for a quarter or a year. See opening and closing balances.
How do you find slow movers and dead stock?
Last Sale Date =
VAR AsOf = MAX ( 'Date'[Date] )
RETURN CALCULATE ( MAX ( Sales[Date] ), ALL ( 'Date' ), 'Date'[Date] <= AsOf )
Days Since Last Sale =
VAR AsOf = MAX ( 'Date'[Date] )
VAR L = [Last Sale Date]
RETURN IF ( NOT ISBLANK ( L ), AsOf - L )
Dead Stock Value =
SUMX (
VALUES ( 'Product'[Product] ),
IF ( [Days Since Last Sale] > 180 || ISBLANK ( [Last Sale Date] ),
CALCULATE ( [Inventory Value], LASTDATE ( 'Date'[Date] ) ) )
)A table of products sorted by Days of Inventory, with stock value and days since last sale, is the working list for buyers.
What goes wrong?
- Summing stock over months. A balance; average the snapshots.
- Revenue instead of COGS. Stock is at cost; dividing revenue by it inflates turnover by the margin.
- Year-end stock only. Seasonal businesses look different at every month end; average twelve months.
- One number for all products. Fresh food and spare parts should not share a target.
Where can you check this?
- Microsoft Learn: LASTDATE function (DAX)
- Microsoft Learn: AVERAGEX function (DAX)
- Microsoft Learn: Scatter, bubble, and dot plot charts in Power BI
Where do you start?
Load monthly stock snapshots at cost, build Average Inventory and turnover by category, and list dead stock. Fill rate and stockouts shows the other side: too little stock.