Skip to content
About
Main content

Additivity comes first

Which measures can be summed across which dimensions, and why must ratios be recomputed rather than averaged?

Additivity comes before fact table types, because it derives the types and because it is the most common silent error in the field.

A measure is:

KindMeaningExamples
AdditiveSumming it across every is meaningfulsale amount, quantity shipped
Semi-additiveSumming across some dimensions is meaningful, but not across timeaccount balance, inventory on hand, headcount
Non-additiveIt cannot be summed at allratios, percentages, unit prices, margins

Why semi-additive measures cannot be summed over time

The reason is not convention. These measures are : a quantity that persists and is measured at a moment (versus a flow, which is an amount that happens during a period). Summing a stock across time counts the same persisting thing once per period.

That is Nadia's gift-card tile: it summed 12 month-end balances.

Non-additive measures must be recomputed

Ratios, percentages, unit prices and margins must be recomputed from their components at the target : sum the numerator, sum the denominator, then divide. Never average them.

-- WRONG: average of ratios
SELECT AVG(margin_pct) FROM daily;            -- 30%

-- RIGHT: ratio of sums
SELECT SUM(margin) * 1.0 / SUM(revenue) FROM daily;   -- 140 / 1000 = 14%

Averaging a ratio is the single most reliable way to produce a number that is wrong by a defensible-sounding amount. (The average gives each day the same weight, even though Tuesday had nine times the revenue.)

This is It is the first thing a semantic layer exists to enforce.