Ratio Metric
A ratio metric is one whose value is a quotient: conversion rate, gross margin percentage, error rate, click-through rate. It has two parts, and metric specifications treat that as structural — dbt lists ratio as one of its metric types (“conversion, cumulative, derived, ratio, or simple“) and ratio metrics “involve a numerator metric and a denominator metric.” Product descriptions here follow the dbt documentation, checked in September 2026.
The reason to treat it as a distinct kind, rather than as a number like any other, is that it does not aggregate. Counts add up across days, regions, and segments. Ratios do not.
The average of averages
Take two days. Monday: 50 conversions from 1,000 sessions, a rate of 5%. Tuesday: 20 conversions from 100 sessions, a rate of 20%. Averaging the two daily rates gives 12.5%. Dividing the totals gives 70 conversions from 1,100 sessions — about 6.4%.
Both calculations are arithmetically correct and they answer different questions. The 12.5% is the average of two daily rates, which weights a 100-session day equally with a 1,000-session day. The 6.4% is the rate a visitor actually experienced over the period. Almost always the second is what was asked for, and the first is what a dashboard produces when someone drops a rate column into a chart and lets the tool average it.
The gap grows with how uneven the denominator is across the groups being combined, which is why this error hides during steady traffic and appears after a campaign, an outage, or a new market launch — exactly when someone is looking closely.
Store the parts, divide at the end
The rule that prevents it: keep the numerator and the denominator as the stored, transported quantities, and compute the quotient at the moment of display, at whatever grouping is being shown.
That rule carries a condition worth stating, because it is where it breaks. Summing the components and dividing is correct only when both components are additive over the dimension you are combining. They are when both are plain counts or sums. They are not when either side counts distinct things: two users who both visit Monday and Tuesday, one buying each day, give 1/2 and 1/2 by day, which summed and divided reads 2/4 = 50% — while the period rate over unique users is 2/2 = 100%. For distinct components, re-derive over the whole period or carry a state that supports union; for balances, fix a point-in-time rule.
This is what declaring a ratio metric as two component metrics accomplishes — the engine re-derives the ratio at the requested grain instead of aggregating a pre-computed rate. It also means a table of conversion rates by segment can be rolled up correctly without anyone re-deriving anything by hand.
The general property behind this is worth knowing by name, because it applies beyond ratios: some measures survive summation across dimensions and some do not. The two that break are the semi-additive fact — an account balance adds across accounts but not across time — and the non-additive fact, of which a ratio is the everyday example.
Choosing the denominator is the hard part
For most business ratios the numerator is uncontroversial and the denominator decides what the number means. Conversion rate has at least four defensible versions.
| Denominator | The question it answers |
|---|---|
| All sessions | How well does the whole funnel perform, including people who never reached the product? |
| Sessions that reached the checkout page | How well does the checkout step perform, given intent? |
| Unique users in the period | What share of people convert, regardless of how many times they visit? |
| Eligible users only | How well does it perform among those who could actually buy — excluding blocked regions, existing subscribers? |
Those produce materially different numbers from the same data, and a team optimizing the second while leadership reads the first will report progress that leadership cannot see. Which is why the denominator, not the name, is the part of a metric definition that must be written down — together with the exclusions, expressed in tooling as a filter “applying filters to dimensions, entities, time dimensions, or other metrics during metric computation. Consider it as your WHERE clause.”
A related trap: changing the denominator’s population changes the metric even when the formula is untouched. Excluding a newly blocked region tomorrow makes the rate jump, and the jump will be read as an improvement unless the change is announced.
Small denominators lie
A ratio computed on few observations swings wildly, and slicing a dashboard finely produces exactly that. Two conversions out of four is 50%, and the segment that tops the leaderboard is often the one with eight visitors.
Two habits contain it. Show the denominator next to the ratio, always — a rate without its base is not interpretable, and seeing “50% (2 of 4)” ends the conversation immediately. And set a minimum base below which the ratio is suppressed rather than displayed, chosen per metric rather than as a global constant.
Reporting the components alongside the ratio also answers a question the ratio alone cannot: whether a rate moved because the numerator rose or because the denominator fell. Conversion rate improving while both conversions and sessions decline is a different business event from the same rate improving on flat traffic, and only one of them is good news.
How ratio metrics fit with definitions, the semantic layer, and change management is worked through in Whose Revenue Number Is Right?.
Reference: dbt Documentation, Creating metrics.
Discover more from Insightful Data Lab
Subscribe to get the latest posts sent to your email.
