**The brief — spec first.** Additive measures (amounts, deltas) aggregate by *summing* along a dimension. Ratios (growth %, shares) do **not** — a portfolio's growth is not the average of its parts' growth. The stub commits exactly that error: it averages the six position growth-rates and reports **11.81 %**. The real answer, built from the *totals*, is **7.74 %**. Fix `PortfolioGrowthPct` so the battery goes green — without touching anything additive.
This is the first genuinely dangerous move in data modeling: choosing how a measure aggregates. Get it wrong and every roll-up lies. Lesson 1 said "the table is a view of the cube" — this exercise shows that how you fold the cube depends on what kind of number you are folding.
The spec
Read it before you run anything — that is the "spec first" discipline:
- Additive —
Delta(p)isCell(p,"2025") − Cell(p,"2024"). Summing the six deltas must equalTotal("2025") − Total("2024")= 82. These already pass; leave them. - Ratio —
PortfolioGrowthPct()must be(Total25 − Total24) / Total24 × 100= 7.74 %. - It must not be
positions.Average(GrowthPct)= 11.81 % — the trap the stub is currently in. Averaging percentages silently over-weights the smallest positions (Cash and Receivables each grew 20 %) and ignores that Bonds — the biggest — grew only 2.5 %.
The rules
- The additive checks are already green. Leave them alone — they prove deltas do sum.
- Only
PortfolioGrowthPctis wrong. Rewrite its one line to divide the change in total by the base-year total. - Target the frozen truth: 7.74 %. Run until the battery is all-✓.
Your workbench
When the ratio row turns green while the additive rows never moved, you have felt the distinction in your fingers: amounts and deltas fold by summing; ratios must be recomputed from the totals. That single rule saves more roll-ups than any other in this course.
Cracked it? Reveal the solution — the one correct line and why 7.74 beats 11.81.