modeling-revenue-metrics
Build reusable revenue models — MRR, ARR, gross revenue, new/expansion/contraction/churn, ARPU, LTV, and per-customer/per-account revenue — on either PostHog data-warehouse views (HogQL) or an external dbt project. Use when the user wants to model, define, or compute recurring revenue, monthly/annual recurring revenue, churn or retention of revenue, lifetime value, average revenue per user, or revenue by customer, cohort, product, or currency. On PostHog, build on the managed revenue_analytics_* views (revenue_item, mrr, customer, subscription, charge, product) fed by Stripe or custom revenue events — not raw Stripe tables — and normalize money with convertCurrency(). In dbt, stage the payment source and compute fct_mrr / fct_revenue_item / dim_customer marts with tests. Covers picking the right source, the subscription-config gotcha that leaves MRR empty, currency handling, and linking revenue to persons/groups. Read modeling-warehouse-foundations first for the view-vs-dbt mechanics.
Pinned to revision 4e8964e24a5a, so it is the text this page describes rather than whatever the author pushed since.
Files
- skills/modeling-revenue-metrics/SKILL.md
- skills/modeling-revenue-metrics/references/dbt/_sources_stripe.yml
- skills/modeling-revenue-metrics/references/dbt/dim_customer.sql
- skills/modeling-revenue-metrics/references/dbt/fct_mrr.sql
- skills/modeling-revenue-metrics/references/dbt/fct_revenue_item.sql
- skills/modeling-revenue-metrics/references/dbt/schema.yml
- skills/modeling-revenue-metrics/references/posthog/gross_revenue_by_month.sql
- skills/modeling-revenue-metrics/references/posthog/mrr_and_arr.sql
- skills/modeling-revenue-metrics/references/posthog/revenue_by_customer.sql
- skills/modeling-revenue-metrics/references/revenue-metric-definitions.md
Every link opens the file at its source, pinned to the revision this page describes.