Plain-language questions
Ask for days inventory outstanding (DIO) per month, customer or product in the SQL Explorer with AI. The AI writes the SQL, you see the query and run it yourself; the AI only receives metadata.
KPI · Inventory, purchasing and production
Days inventory outstanding (DIO) is the average number of days stock is held before it is sold. Together with days sales outstanding (DSO) and days payable outstanding (DPO), it makes up the cash conversion cycle. Fewer days means cash comes back out of stock more quickly.
Average inventory value ÷ cost of goods sold × number of days in the period
In the first quarter of 2026 (90 days) Acme Groothandel had average inventory of €1,200,000 and cost of goods sold of €1,350,000. DIO is €1,200,000 ÷ €1,350,000 × 90 = 80 days.
Fictitious figures for Acme Groothandel, a sample wholesaler.
A lower number means less working capital is tied up in stock. If DIO rises while revenue stays flat, stock is growing faster than sales. Compare with the same period last year, with supplier lead times and by product group; seasonal buying can distort the picture temporarily.
SQL & DAX
Two examples on a fictitious data warehouse for Acme Groothandel: a PostgreSQL query and a measure for a Power BI model. Adjust table and column names to your own model.
WITH cogs AS (
SELECT date_trunc('month', o.order_date) AS month,
SUM(ol.quantity * ol.unit_cost) AS cogs
FROM order_lines ol
JOIN orders o ON o.order_id = ol.order_id
GROUP BY 1
),
stock AS (
SELECT date_trunc('month', snapshot_date) AS month,
SUM(value) / COUNT(DISTINCT snapshot_date) AS avg_value
FROM stock_levels
GROUP BY 1
)
SELECT c.month,
ROUND(s.avg_value / NULLIF(c.cogs, 0)
* EXTRACT(day FROM c.month + interval '1 month' - interval '1 day'), 1) AS dio_days
FROM cogs c
JOIN stock s ON s.month = c.month
ORDER BY c.month;Average Inventory Value = AVERAGEX(VALUES(Stock[SnapshotDate]), CALCULATE(SUM(Stock[Value])))
DIO = DIVIDE([Average Inventory Value], SUMX(Sales, Sales[Quantity] * Sales[UnitCost])) * COUNTROWS('Date')In ENABLE
Ask for days inventory outstanding (DIO) per month, customer or product in the SQL Explorer with AI. The AI writes the SQL, you see the query and run it yourself; the AI only receives metadata.
Define the KPI as a measure in your Power BI model and show it in the portal, with "Last refreshed" next to it. Access profiles and optional row-level security decide who sees which figures.
Add the KPI as a tile to a custom dashboard, compared with last year. The Dashboard Builder is a pilot and can be switched on per client.
With the built-in Targets app you set a target for the KPI per month, so you see actuals and target side by side.
FAQ
Divide average inventory value by cost of goods sold and multiply by the number of days in the period. Use 365 for a year and about 90 for a quarter. Value inventory and cost of goods sold on the same basis.
The cash conversion cycle is DIO plus DSO minus DPO. Every day you take out of inventory shortens the time between paying your supplier and getting paid by your customer. That is why finance and operations often look at this figure together.
DIO looks backwards and uses value: how long stock was held on average, based on cost of goods sold. Days of supply looks forwards and uses units: how many days current stock will last at expected demand. The first is a working capital measure, the second a replenishment measure.
In an online demo we show how ENABLE makes your data securely available and how you build on it: describing an app in the AI Builder, plain-language questions, dashboards and APIs. And how we set it up and manage it for you.