Plain-language questions
Ask for gross margin 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 · Finance
Gross margin is the percentage of revenue that remains after deducting the cost of goods sold. It shows how much you earn on every euro of sales before staff, premises and other overheads are paid. That makes gross margin the first indicator of how well your pricing and purchasing work.
(Revenue − cost of goods sold) ÷ revenue × 100%
In 2025 Acme Groothandel had revenue of €12,000,000 and cost of goods sold of €8,400,000. Gross profit is €12,000,000 − €8,400,000 = €3,600,000. Gross margin is €3,600,000 ÷ €12,000,000 × 100% = 30%.
Fictitious figures for Acme Groothandel, a sample wholesaler.
A higher gross margin means more of each euro of revenue is left to cover fixed costs. Compare it with the same period last year, with budget and across product groups or customer segments: a falling margin often points to higher purchase prices, deeper discounts or a shift towards cheaper products. Only compare with other companies if they calculate cost of goods sold in the same way.
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.
SELECT date_trunc('month', entry_date)::date AS month,
SUM(amount) FILTER (WHERE account_group = 'revenue') AS revenue,
SUM(amount) FILTER (WHERE account_group = 'cogs') AS cogs,
ROUND(100.0 * (SUM(amount) FILTER (WHERE account_group = 'revenue')
- SUM(amount) FILTER (WHERE account_group = 'cogs'))
/ NULLIF(SUM(amount) FILTER (WHERE account_group = 'revenue'), 0), 1) AS gross_margin_pct
FROM gl_entries
WHERE entry_date >= date_trunc('year', current_date)
GROUP BY 1
ORDER BY 1;Revenue = CALCULATE(SUM(GL[Amount]), GL[AccountGroup] = "revenue")
Gross Margin % =
DIVIDE([Revenue] - CALCULATE(SUM(GL[Amount]), GL[AccountGroup] = "cogs"), [Revenue])In ENABLE
Ask for gross margin 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
Subtract cost of goods sold from revenue, divide the result by revenue and multiply by 100%. With €100,000 of revenue and €70,000 of cost of goods sold, gross margin is 30%. Use the same period and scope for both figures.
Gross margin deducts only the cost of goods sold, while net profit margin deducts all costs, including staff, depreciation, interest and tax. Gross margin tells you about pricing and purchasing; net profit margin tells you about the profitability of the business as a whole.
Margin is profit as a percentage of the selling price, markup is profit as a percentage of cost. A product bought for €70 and sold for €100 has a 30% margin and a markup of about 42.9%. Mixing the two up leads to wrong pricing decisions.
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.