EnableYourData.com

KPI · Inventory, purchasing and production

GMROI: formula and example.

GMROI (gross margin return on investment) shows how much gross margin you earn for every euro held in stock on average. It combines margin and turnover in a single figure. That tells you which products or product groups earn their place in the warehouse.

GMROI formula

Gross margin ÷ average inventory value (at cost)

Worked example

In 2025 Acme Groothandel made a gross margin of €1,800,000. Average inventory value was €1,200,000. GMROI is €1,800,000 ÷ €1,200,000 = 1.5: each euro in stock earned €1.50 of gross margin on average.

Fictitious figures for Acme Groothandel, a sample wholesaler.

How to read this KPI

A GMROI above 1 means the stock generated more gross margin over the period than the capital it tied up. A low-margin product can still have a good GMROI if it sells quickly, and vice versa. Compare product groups with each other and with your own previous years; bear in mind that gross margin does not yet include storage, handling or financing costs.

Pitfalls with GMROI

  • Dividing one month's gross margin by average stock and reading it as an annual figure.
  • Not deducting discounts, rebates or returns from the margin.
  • Valuing stock at selling price rather than at cost.

SQL & DAX

Calculating GMROI in SQL and 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.

SQL · PostgreSQL
WITH margin AS (
  SELECT SUM(ol.quantity * (ol.unit_price - ol.unit_cost) - ol.discount_amount) AS gross_margin
  FROM order_lines ol
  JOIN orders o ON o.order_id = ol.order_id
  WHERE o.order_date >= date '2025-01-01' AND o.order_date < date '2026-01-01'
),
stock AS (
  SELECT AVG(day_value) AS avg_value
  FROM (
    SELECT snapshot_date, SUM(value) AS day_value
    FROM stock_levels
    WHERE snapshot_date >= date '2025-01-01' AND snapshot_date < date '2026-01-01'
    GROUP BY snapshot_date
  ) s
)
SELECT ROUND(gross_margin / NULLIF(avg_value, 0), 2) AS gmroi
FROM margin, stock;
DAX · Power BI
Gross Margin = SUMX(Sales, Sales[Quantity] * (Sales[UnitPrice] - Sales[UnitCost]) - Sales[DiscountAmount])
GMROI = DIVIDE([Gross Margin], AVERAGEX(VALUES(Stock[SnapshotDate]), CALCULATE(SUM(Stock[Value]))))

In ENABLE

Tracking this KPI in ENABLE

Plain-language questions

Ask for GMROI 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.

Read more →

In your Power BI dashboard

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.

Read more →

Custom dashboards (pilot)

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.

Read more →

Monthly targets

With the built-in Targets app you set a target for the KPI per month, so you see actuals and target side by side.

Read more →

FAQ

Frequently asked questions

How do you calculate GMROI?

Divide gross margin for a period, usually a year, by average inventory value at cost over the same period. Gross margin is revenue minus cost of goods sold, after discounts. Calculate it per product group to see the differences.

What does a GMROI of 2 mean?

A GMROI of 2 means every euro of average stock earned two euros of gross margin during the period. Whether that is enough depends on your other costs, such as storage, staff and financing. Compare mainly across your own product groups and periods.

What is the difference between GMROI and inventory turnover?

Inventory turnover only looks at how often stock cycles, based on cost. GMROI looks at how much margin that cycling produces. Two products with the same turnover can therefore have a very different GMROI.

Use AI on your own data. Securely, and without the headache.

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.