One metric, three numbers: writing a metric definition that holds
Active users were 41k, 58k or 112k in the same week, depending on who you asked. The five parts of a metric definition (numerator, denominator, window, filters, owner) and the one-page doc that ends the argument: one page.
Get the free PDF
One page, print-ready, free to share. No signup needed.
Monday standup, 09:30. Product says 41k active users. Finance says 58k. Marketing says 112k. Same company, same week. Nobody is wrong, because nobody wrote down what "active" means. This page covers the five parts every metric definition needs, the one-page doc, and the query that is the doc with the headings removed. The print-ready A4 PDF is at the bottom.
Three answers
- Product, 41k: logged in and did one core action in the last 7 days.
- Finance, 58k: paying seats, this calendar month.
- Marketing, 112k: opened at least one email in the last 30 days.
Three numerators, three windows, three filter lists, one word.
A definition has
- A numerator: did what, exactly which event name.
- A denominator: out of whom, or none if it is a count rather than a rate.
- A window: rolling 7 days? Calendar month? Ending when, in which time zone?
- Filters, and an owner: test accounts out, internal accounts out, deleted users out. One name who approves changes.
The one-page definition
Seven lines. The dashboard and the board deck now read the same file.
| Field | Weekly active user, v2 |
|---|---|
| numerator | users with 1+ core_action event |
| denominator | none: a count, not a rate |
| window | rolling 7 days, ending yesterday 23:59 UTC |
| filters | no internal, no test, no deleted accounts |
| owner | product analytics (Lea), changes by PR |
| SQL | metrics/wau.sql, linked from the dashboard |
Finance keeps "paying seats" and marketing keeps "email reach". Both get their own page and their own name.
The definition as SQL
Every line of the doc is a line of the query. Change the window, change the line, open a PR, the owner reviews it.
SELECT COUNT(DISTINCT e.user_id) AS wau
FROM events e
JOIN users u ON u.id = e.user_id
WHERE e.name = 'core_action'
AND e.occurred_at >= CURRENT_DATE - 7
AND e.occurred_at < CURRENT_DATE
AND NOT u.is_internal
AND u.deleted_at IS NULL;
Half-open window (date ranges), DISTINCT users not events (COUNT(*) vs COUNT(DISTINCT)), filters as explicit lines. The file is the definition. The doc is the file with headings.
Remember
- One page, in git, SQL included, and the dashboard links to it.
The trap: three ways the doc dies
| You did | What happens | Do instead |
|---|---|---|
| the doc lives in a wiki, the SQL in a dashboard | they drift apart in a month | same repository, the doc links to the file |
| window stated, time zone not | the US and EU dashboards disagree at midnight | write the time zone in the window line |
| no owner | three people edit it, nobody says no | one name, changes by PR |
A metric with no owner is a word again.
Frequently asked questions
Why do three teams get three numbers for active users?
What does a metric definition need?
What is a metric definition doc?
What if two teams genuinely need different definitions?
Get the free PDF
One page, print-ready, free to share. No signup needed.