Short answer: fill rate is the share of demand shipped from stock at the first attempt. Unit fill rate = units shipped / units ordered; line fill rate = lines shipped complete / lines ordered; order fill rate = orders shipped complete / orders, the strictest. Stockout rate = product-days with zero stock / all product-days (for products meant to be in stock). With 9,700 of 10,000 units shipped, unit fill rate is 97%, while order fill rate can be far lower, because one missing line spoils a whole order.
Fill rate is the customer's view of inventory, the counterpart to inventory turnover: turnover pushes stock down, fill rate shows when it went too low.
How do the three fill rates differ?
| Level | Ordered | Shipped complete | Fill rate |
|---|---|---|---|
| Units | 10,000 | 9,700 | 97.0% |
| Lines | 2,500 | 2,350 | 94.0% |
| Orders | 1,000 | 870 | 87.0% |
The 300 missing units hit 150 lines spread over 130 orders: 3% of units become 13% of orders.
- Unit fill rate
- Order fill rate
What is the DAX?
From order lines with Ordered Qty and Shipped Qty (shipped at the first attempt):
Units Ordered = SUM ( OrderLines[Ordered Qty] )
Units Shipped = SUM ( OrderLines[Shipped Qty] )
Unit Fill Rate = DIVIDE ( [Units Shipped], [Units Ordered] )
Lines Complete =
CALCULATE ( COUNTROWS ( OrderLines ), FILTER ( OrderLines, OrderLines[Shipped Qty] >= OrderLines[Ordered Qty] ) )
Line Fill Rate = DIVIDE ( [Lines Complete], COUNTROWS ( OrderLines ) )
Order Fill Rate =
VAR Orders = VALUES ( OrderLines[Order ID] )
VAR Complete = FILTER ( Orders, CALCULATE ( [Lines Complete] = COUNTROWS ( OrderLines ) ) )
RETURN DIVIDE ( COUNTROWS ( Complete ), COUNTROWS ( Orders ) )How do you measure stockouts?
From daily stock snapshots (one row per product per day, including zero stock), for active products:
Product Days = COUNTROWS ( Stock )
Stockout Days = CALCULATE ( [Product Days], Stock[On Hand] <= 0 )
Stockout Rate = DIVIDE ( [Stockout Days], [Product Days] )
-- rough lost sales: average daily units on days in stock × days out of stock
Lost Units Estimate =
SUMX (
VALUES ( 'Product'[Product] ),
VAR InStockDates = CALCULATETABLE ( VALUES ( Stock[Date] ), Stock[On Hand] > 0 )
VAR UnitsInStock = CALCULATE ( SUM ( Sales[Quantity] ), TREATAS ( InStockDates, 'Date'[Date] ) )
RETURN DIVIDE ( UnitsInStock, COUNTROWS ( InStockDates ) ) * [Stockout Days]
)For each product, InStockDates lists the days it had stock, and TREATAS applies them to Sales through the Date table, so sales count only on in-stock days. A matrix of products by week with Stockout Days and a red colour scale shows patterns, such as the same products running out every month end.
What goes wrong?
- Unit fill rate only. Looks fine while many orders are incomplete; show order fill rate.
- Backorders shipped later counted as filled. Fill rate is about the first shipment.
- Missing zero-stock rows. If snapshots skip products with no stock, stockouts disappear; generate a row per product per day.
- Discontinued products. Leave them out of stockout rate, or it rises for products no one plans to stock.
Where can you check this?
- Microsoft Learn: FILTER function (DAX)
- Microsoft Learn: TREATAS function (DAX)
- Microsoft Learn: Apply conditional formatting in tables and matrixes
Where do you start?
Report unit, line and order fill rate together by week, then the stockout heat map for the products behind the gap. Forecast accuracy is often the cause.