Plain-language questions
Ask for contribution margin per order 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 · E-commerce
Contribution margin per order is the revenue from an order minus every cost directly tied to that order, such as product cost, shipping, payment fees and packaging. It is the amount left over to cover fixed costs like staff and rent. It shows whether an order is genuinely profitable rather than just adding revenue.
Revenue per order − product cost − shipping cost − payment fees − packaging cost
An average Acme Groothandel order brings in €150 excluding VAT. Product cost is €84, shipping €7.50, payment fees €1.50 and packaging €2.00. Contribution margin is €150 − €84 − €7.50 − €1.50 − €2.00 = €55, or €55 ÷ €150 × 100% = 36.7% of revenue.
Fictitious figures for Acme Groothandel, a sample wholesaler.
A higher contribution margin per order means each order contributes more to fixed costs and profit. Compare it by channel, product category and order size: small orders with free shipping, or marketplace orders carrying commission, often contribute far less. Rising revenue with a falling contribution margin per order is a cue to review pricing, shipping terms or discounts.
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 order_id, SUM(quantity * unit_cost) AS cogs
FROM order_lines
GROUP BY order_id
)
SELECT date_trunc('month', o.order_date) AS month,
COUNT(*) AS orders,
ROUND(AVG(o.total_amount - c.cogs - o.shipping_cost), 2) AS contribution_margin_per_order
FROM orders o
JOIN cogs c ON c.order_id = o.order_id
WHERE o.status <> 'cancelled'
GROUP BY 1
ORDER BY 1;Contribution Margin per Order =
DIVIDE(
SUM(Orders[total_amount])
- SUMX(OrderLines, OrderLines[quantity] * OrderLines[unit_cost])
- SUM(Orders[shipping_cost]),
DISTINCTCOUNT(Orders[order_id])
)In ENABLE
Ask for contribution margin per order 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 all variable costs from the order's revenue: product cost, shipping, payment fees, packaging and any commission. With €100 in revenue, €55 product cost and €10 of other variable costs, contribution margin is €35. Work with revenue excluding VAT.
Gross margin is revenue minus only the cost of goods sold. Contribution margin also deducts all other variable costs, such as shipping and payment fees. For an online shop, contribution margin therefore gives a fairer picture of what an order earns.
Include every cost that moves with the number of orders: product cost, shipping, packaging, payment fees, marketplace commission and return costs. Leave out fixed costs such as salaries, rent and software. Some teams also deduct advertising cost per order; if you do, say so in the definition.
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.