Metric additivity
Ask which dimension a number may be added across
An additive metric may be summed across all applicable dimensions for disjoint groups under its business definition. Revenue is additive in this example because every line uses USD and appears once. A semi-additive metric can be summed across some dimensions but not others: end-of-day stock can be summed across products for the same snapshot date when units are comparable, but summing stock across dates does not give ending stock. Non-additive metrics include percentages and averages that need to be recalculated from components. These labels apply to metric definitions, not merely column data types.
Example 1: inventory snapshots are not transactions
The separate inventory fixture has one row per date and product. On Jan 5 the three products have 10, 6 and 4 units (20 total). On Jan 6 they have 8, 5 and 7 units (20 total). On Jan 7 they have 5, 3 and 7 units (15 total). Ending stock for Jan 5–7 is 15, not 55. The average of the three complete daily totals is 55 / 3, approximately 18.33 units; it answers a different question. This example assumes complete synchronized snapshots for every product and one common counting unit (items). In a real model define the closing date, incomplete snapshot behavior, and whether the last available observation is acceptable. Never silently treat a missing snapshot as zero. Do not add inventory and sales quantities to form a meaningful metric just because both use units.
Example 2: calculate the ratio from totals
Gross profit in this fixture is revenue minus line cost (Quantity × UnitCostUSD). North has 104 USD revenue. Calculate profit from the lines: L01 profit 8, L02 profit 12, L04 profit 18, totaling 38 USD. South has 96 USD revenue and 36 USD profit (L03 12, L05 24). Total profit is 74 USD, so gross margin is 74 / 200 = 37%. North margin is 38 / 104 ≈ 36.54%; South is 36 / 96 = 37.50%. An unweighted mean of the two percentages gives about 37.02%, not the defined total. Use sum of profit divided by sum of revenue, and decide how to display a zero denominator (here undefined, not zero). These are simplified educational amounts with no tax, discounts or overhead; actual accounting definitions require a separate policy.
Factless facts still represent events or coverage
A factless table has keys and records an event or association without an explicit numeric measurement. The fixture promotion-coverage.csv has one row per eligible date/product pair. There are four unique pairs; P01 has two eligible dates, and P02 and P03 each have one. Counting rows gives four coverage pairs, not four sales or four distinct products. Coverage can include a day with no sale. For example P03 is eligible on Jan 7 although no P03 sales line occurs that day. To assess sales during promotions, define how coverage matches transactions at compatible grain; do not infer causal uplift from this tiny table.
Common mistakes: aggregation is a business decision
A visual can offer Sum for a numeric column even when Sum is inappropriate. Avoid summing unit price, balance across dates, distinct customer counts across overlapping groups, or margin percentages. Specify time window, group boundaries, units, denominator and missing-value handling. For distinct order counts by product, O01 is present in two groups, so adding product-level distinct order counts counts it twice. Keep components of ratios available so later DAX measures can compute them under the current filter context.
Practice: select the aggregation
Complete task 3 in labs/dimensional-basics/worksheet.md. Compute ending stock, overall gross margin and promotion coverage. Explain why each uses a different aggregation and specify the zero-revenue and missing-snapshot policies.
Official reading
Fact tables and measure types · Star schema and factless facts · Conformed dimensions. Calculations are independently checked; native DAX NOT RUN.