SaaS metrics — MRR, ARR, churn, NRR, CAC, LTV — are the backbone of subscription business steering. Apache Superset is particularly well suited to compute and visualize them. This article provides ready-to-use SQL templates, dashboard structure, and typical pitfalls to avoid when building a reliable metrics system.
1. Why compute SaaS metrics in Superset?
Many SaaS startups compute metrics in Stripe, ProfitWell, or a Google Sheet. Quick to set up but quickly limited: no drill-down, no cohort analysis, no cross with product data. Apache Superset, connected to your data warehouse, lets you compute everything in one place with versioned, auditable logic.
If you want to test Superset quickly, TVL Managed Superset deploys a ready-to-use instance in less than 3 minutes.
2. Minimal data model
To compute SaaS metrics, you need at least three tables:
customers: one account per row, with acquisition date, segment, plan;subscriptions: one subscription per row, with start/end dates, amount, plan;invoicesorpayments: one payment per row, with date, amount, status.
Ideally modeled in dbt layers:
- staging: raw tables from Stripe/HubSpot;
- marts:
dim_customers,fct_subscriptions,fct_mrr_movements; - exposures: datasets used by Superset.
3. MRR (Monthly Recurring Revenue)
Definition
Recurring revenue normalized over a month. Excludes one-off payments, setup fees, and credits. For an annual subscription, divide by 12.
SQL model
WITH active_subs AS (
SELECT
DATE_TRUNC('month', current_date) AS month,
customer_id,
CASE
WHEN billing_cycle = 'monthly' THEN amount
WHEN billing_cycle = 'yearly' THEN amount / 12.0
ELSE 0
END AS mrr_contribution
FROM fct_subscriptions
WHERE status = 'active'
AND start_date <= DATE_TRUNC('month', current_date)
AND (end_date IS NULL OR end_date > DATE_TRUNC('month', current_date))
)
SELECT month, SUM(mrr_contribution) AS mrr
FROM active_subs
GROUP BY 1;
Visualization
Big Number with 12-month sparkline. Conditional color (green if MoM growth, red if decline).
4. ARR (Annual Recurring Revenue)
Trivially MRR × 12. Displayed alongside MRR for context. For companies with mostly annual contracts, some prefer to compute ARR directly from active contracts (without going through MRR), avoiding monthly normalization artifacts.
5. Net New MRR
Definition
MRR variation between two months, decomposed into four components:
- New MRR: new customers this month;
- Expansion MRR: upsells, additional seats on existing customers;
- Contraction MRR: downgrades, seat reductions;
- Churned MRR: customers lost this month.
Net New MRR = New + Expansion − Contraction − Churn.
Visualization
Stacked bar chart with the 4 components per month, plus a "Net New MRR" line overlay. The most powerful chart on an investor board dashboard.
6. Churn rate
Definitions
- Logo churn: percentage of customers lost / customers at period start;
- Revenue churn (gross): MRR lost / MRR at period start;
- Net revenue churn: (MRR lost − Expansion MRR) / MRR at period start. Can be negative if expansion > churn.
SQL model (monthly logo churn)
WITH monthly_state AS (
SELECT
DATE_TRUNC('month', date_day) AS month,
COUNT(DISTINCT CASE WHEN was_active_start THEN customer_id END) AS customers_start,
COUNT(DISTINCT CASE WHEN churned_during_month THEN customer_id END) AS churned
FROM fct_customer_state_daily
GROUP BY 1
)
SELECT
month,
customers_start,
churned,
churned * 1.0 / NULLIF(customers_start, 0) AS logo_churn_rate
FROM monthly_state
ORDER BY 1;
7. NRR (Net Revenue Retention)
Definition
NRR = (initial MRR + Expansion − Contraction − Churn) / initial MRR, measured on a customer cohort over 12 months. NRR > 100% means the existing base alone keeps growing. Best-in-class B2B benchmarks are 120-130%.
Visualization
Big Number with context (target vs actual) + bar chart per acquisition cohort to identify which cohorts perform.
8. CAC (Customer Acquisition Cost)
Definition
CAC = (marketing + sales cost) / new customers acquired in the period. Compute by channel to identify profitable channels.
Data sources
Requires integration of:
- Ad costs (Google Ads, Meta Ads, LinkedIn);
- Marketing and sales salary costs;
- Attribution of new customers to their original channel.
9. LTV (Lifetime Value) and LTV/CAC ratio
Simplified formula
LTV = ARPU × gross margin / monthly churn. For a B2B SaaS with €200 ARPU and 2%/month churn, LTV = 200 × 0.8 / 0.02 = €8,000. With €800 CAC, LTV/CAC ratio is 10, excellent (target > 3).
Limits
This formula assumes constant churn and stable margin. In practice, churn varies by cohort and margin evolves with scale. For finer analyses, prefer cohort-based empirical LTV.
10. Cohort retention curve
Line chart with one curve per acquisition cohort (month N+0, N+1, …, N+24). Shows whether recent cohorts retain better than older ones — a product improvement signal.
SQL model:
SELECT
DATE_TRUNC('month', acquired_at) AS cohort_month,
DATEDIFF('month', acquired_at, observation_date) AS months_since_acquisition,
COUNT(DISTINCT customer_id) AS active_customers,
COUNT(DISTINCT customer_id) * 1.0
/ FIRST_VALUE(COUNT(DISTINCT customer_id))
OVER (PARTITION BY DATE_TRUNC('month', acquired_at)
ORDER BY DATEDIFF('month', acquired_at, observation_date)) AS retention_rate
FROM fct_customer_active_monthly
GROUP BY 1, 2
ORDER BY 1, 2;
11. The investor board dashboard (template)
A proven structure:
- Row 1 — Big Number KPIs: MRR, ARR, # paying customers, NRR;
- Row 2 — MRR evolution: 24-month line chart;
- Row 3 — Net New MRR decomposed: stacked bar chart;
- Row 4 — Churn and NRR: dual-axis chart;
- Row 5 — Cohort retention: heatmap or per-cohort line chart;
- Row 6 — Acquisition: funnel + CAC by channel.
This configuration is automatically managed by TVL Managed Superset via a dashboard template shipped with Pro+ instances, covering 80% of SaaS use cases.
12. Frequent pitfalls
- Confusing MRR and revenue: if you bill in advance, monthly MRR ≠ monthly cash revenue;
- Forgetting discounts and coupons: a -50% customer brings half the theoretical MRR;
- Computing churn on new customers: early-adopters churn more, biasing the ratio without segmentation;
- Mixing annual and monthly: always normalize to consistent MRR or ARR;
- Heavy virtual datasets: for SaaS metrics, create physical tables refreshed daily, not SQL Lab views;
- Live data in production: don't connect Superset to the application DB directly, always go through a replica or a warehouse.
13. Recommended refresh frequency
| Metric | Refresh frequency |
|---|---|
| MRR / ARR | Daily |
| Net New MRR | Daily |
| Churn | Monthly (end-of-month snapshot) |
| NRR | Monthly |
| CAC | Weekly |
| LTV / cohort | Monthly |
14. Going further
See our related articles:
- Apache Superset for SaaS startups — use case overview;
- What is Apache Superset? — for newcomers;
- Managed vs self-hosted — for hosting choice.
15. FAQ
Should you duplicate calculations between Stripe and Superset?
No, and it's actually to be avoided. Risk: the two sources diverge. Define Superset as source of truth, and use Stripe only for billing. Every business metric must be computed in the warehouse, not Stripe.
What MRR refresh granularity?
Daily suffices. Real-time refresh adds no business value (MRR doesn't change significantly in a few hours) and is expensive in resources. Prefer a nightly dbt job at 4 AM.
How to handle historical pricing changes?
With a dim_plans_history table that versions prices with validity dates. Any MRR query joined on this table reflects the price applicable at the considered date. Initial investment that prevents many later errors.
How to audit reliability of computed SaaS metrics?
Three complementary techniques: (1) dbt tests on fct/dim models, (2) monthly reconciliation with Stripe and accounting, (3) third-party review (CFO or consultant) at least once per year.
Can these dashboards be presented to investors?
Yes, even recommended to show steering rigor. The best investors appreciate seeing live metrics over static slides. Prepare a "board view" dashboard filterable by month, with annotations on key events (launches, raises, hires).
16. Conclusion
Building SaaS metrics in Apache Superset takes some initial investment (dbt modeling, dashboards), but ROI is immediate: single source of truth, fine cross-cutting analyses, zero marginal cost when adding internal users. A silent competitive advantage: startups that finely steer their metrics grow better. Beyond the board dashboard, these metrics fuel weekly team reviews, pricing decisions, and product trade-offs; they become the common language of the entire organization.
Want the benefits of Apache Superset without the friction of installation and maintenance? Deploy your instance in 3 clicks with TVL Managed Superset, hosted in Europe (OVHcloud, Roubaix, France).