Metric · Sales

What is deal profitability, and how do you measure it in Metabase?

Deal profitability is the margin a deal actually earns: revenue net of discounts, minus the cost to deliver and serve it — implementation hours, support load, infrastructure, commissions. Revenue targets reward closing anything; this metric shows which wins were worth winning. Measure it in Metabase by joining CRM data from HubSpot or Salesforce with cost data from QuickBooks or NetSuite in one warehouse.

TL;DR — margin per deal = net revenue − cost to deliver, computed per won deal and segmented by product, segment, and rep. It needs CRM and finance data joined on a deal or account key — neither system has both halves. Watch discount depth as the leading indicator.

What does a deal profitability chart look like in Metabase?

Chart average margin per won deal by month and watch the level and the slope together. The steady climb says pricing discipline is holding as deal volume grows, while a dip like Dec 2025's is the classic quarter-end signature — deeper discounts buying year-end closes at the expense of margin.

Deal profitability in Metabase: a line chart of average margin per won deal by month.
Deal profitability as a Metabase card, built from CRM and finance data. Figures are illustrative.

What deal profitability measures

It measures whether a deal made money, not just whether it closed. A team can hit its revenue number while margin quietly erodes: discounts deepen to force quarter-end closes, implementation-heavy deals eat their first-year revenue in services, and small accounts generate outsized support load. None of that shows up in bookings, win rate, or average deal size — the three numbers most sales dashboards stop at.

Segmented by product, customer segment, and rep, margin per deal turns pricing debates into data: which discounts pay for themselves, which segments cost more to serve than they return, and whose pipeline is actually profitable. Over a customer's lifetime the same logic rolls up into LTV; at company level it rolls up into gross margin.

What data does it need?

  • Deal records from the CRM: amount, list price or discount percentage, product, segment, owner, and closed_at — synced from HubSpot, Salesforce, Pipedrive, or Attio via a pipeline like Airbyte or Fivetran.
  • Cost records from finance or PSA systems: commissions, implementation time at a loaded rate, support effort, and attributable infrastructure — from QuickBooks, Xero, or NetSuite.
  • A join key connecting the two: a deal or account identifier carried on invoices, time entries, and commission records. Modeling this mapping is usually the real work.
  • A modeled deal_costs table that sums cost lines per deal, so the margin query stays a simple join.

SQL patterns

Margin per won deal by month PostgreSQL
SELECT
  date_trunc('month', d.closed_at) AS month,
  COUNT(*) AS won_deals,
  ROUND(
    SUM(d.amount - COALESCE(c.total_cost, 0)) / COUNT(*), 0
  ) AS avg_margin_per_deal,
  ROUND(
    100.0 * SUM(d.amount - COALESCE(c.total_cost, 0))
      / NULLIF(SUM(d.amount), 0), 1
  ) AS margin_pct
FROM modeled_deals d
LEFT JOIN deal_costs c ON c.deal_id = d.deal_id
WHERE d.is_won
  AND d.closed_at >= CURRENT_DATE - INTERVAL '12 months'
GROUP BY 1
ORDER BY 1;
Discount depth vs. win rate by segment PostgreSQL
SELECT
  segment,
  CASE
    WHEN discount_pct < 10 THEN '00-10%'
    WHEN discount_pct < 20 THEN '10-20%'
    WHEN discount_pct < 30 THEN '20-30%'
    ELSE '30%+'
  END AS discount_band,
  COUNT(*) FILTER (WHERE is_won)    AS won,
  COUNT(*) FILTER (WHERE is_closed) AS closed,
  ROUND(
    100.0 * COUNT(*) FILTER (WHERE is_won)
      / NULLIF(COUNT(*) FILTER (WHERE is_closed), 0), 1
  ) AS win_rate_pct
FROM modeled_deals
WHERE is_closed
GROUP BY 1, 2
ORDER BY 1, 2;

Pitfalls

Treating bookings as the finish line. → A quarter that beats its revenue target can still destroy margin if the beats came from deep discounts and services-heavy deals. Report margin per deal next to bookings, not instead of them.
Judging deals before costs have landed. → Implementation hours and support load accrue for months after the close date. Score recent deals as provisional, or use discount depth as the early read while costs settle.
Allocating overhead to force a company-level match. → Spreading rent and general overhead across deals makes every deal look uniformly worse and blurs the ranking between them. Keep deal-level costs attributable; reconcile to company margin separately.
Averaging margin percentages across segments. → A 90% margin on a small deal and a 10% margin on a large one don't average to 50%. Sum revenue and costs per segment, then divide — same rule as any ratio metric.

Where this metric applies

Metrics

Analytics

Dashboards

FAQ

How is deal profitability different from gross margin?
Gross margin is a company-level ratio: revenue minus cost of goods sold, across everything you sold. Deal profitability applies the same idea at deal grain — net revenue minus the cost to deliver that deal — so you can see which segments, products, and reps the company-level number is averaging away. A healthy blended margin can hide a whole segment that loses money on every win.
What costs should count against a deal?
Start with the costs you can attribute cleanly: discounts (as reduced revenue), sales commissions, implementation and onboarding hours at a loaded rate, and any usage-based infrastructure the contract consumes. Add allocated support load once you can tie tickets to accounts. Resist the urge to spread general overhead across deals — it turns a sharp metric into a fuzzy one, and the ranking between deals is what you act on.
Where does the cost data come from?
Deal values and discounts come from the CRM; costs come from your accounting or PSA system — QuickBooks, Xero, or NetSuite — synced into the same warehouse with a pipeline like Airbyte or Fivetran. The join key is the hard part: you need a deal or account identifier carried on invoices, time entries, and commission records, which usually means modeling a mapping table first.
Why track discount depth if I already track margin?
Margin per deal is a lagging number — delivery costs land months after the signature. Discount depth is the leading indicator: it is known the day the deal closes and it moves first when reps start buying revenue. Chart discount bands against win rate by segment; if deeper discounts barely move the win rate, you are giving margin away for nothing.
How do you track deal profitability in Metabase?
Sync CRM deals from HubSpot or Salesforce and cost records from your finance system into one warehouse, model a deal_costs table keyed by deal, and chart margin per won deal by month, segment, and rep. Pin it next to average deal size on your sales pipeline dashboard so deal count, size, and margin get read together.