Fact Table Design: Additive, Semi-Additive & Non-Additive Measures
Explain the difference between additive, semi-additive, and non-additive measures and why this distinction determines correct aggregation logic in a warehouse and RPD.
Whether a measure can be summed depends on which dimension you are summing across. Getting this wrong is a common production bug.
Revenue is like rainfall — total rainfall over a year is just the sum of every day's rainfall, additive in every direction. A bank balance is like a fuel gauge reading — summing your car's fuel gauge readings across every day of the month gives a meaningless number, but the average or ending reading is meaningful. A unit price is like a speed limit sign — averaging the speed limits of every road you drove on tells you nothing useful about your actual average driving speed, which you'd instead compute from total distance divided by total time.
Key Concepts
revenue, quantity, cost account balance, inventory on hand, headcount balance by branch, on 31 March: sum the branches -> correct
balance across January to March: sum the months -> wrong SUM over every dimension
LAST over Time ratios, percentages, unit prices, margin % margin % by region: 20%, 30%, 25%
summed: 75% -> meaningless
averaged: 25% -> also wrong, unless the regions are equal store revenue and cost
compute margin % = SUM(revenue - cost) / SUM(revenue)