Practice — Mild · Family Rehearsal
Skills focus. Writing the lesson's measure family with the answer key open —
muscle memory for A05.
Ungraded. Start from your A04 star. Every checkpoint is a verified figure.
Tasks
- Calculated column on sales:
Line Revenue = Sales[Quantity] * Sales[UnitPrice] * (1 - Sales[DiscountPct]). Checkpoint: a card summing it reads $66.81M. - Explicit measure:
Total Revenue = SUM ( Sales[Line Revenue] ). Format as currency on the measure. Replace the implicit card with it. - Rewrite it the column-free way with SUMX (keep both temporarily; compare: identical $66,813,563.97). Delete one — your choice, but know why you chose.
Total Cost = SUMX ( Sales, Sales[Quantity] * RELATED ( Products[UnitCost] ) ). Checkpoint: $28,099,192.18.- Compose:
Gross Profit = [Total Revenue] - [Total Cost]andGross Margin % = DIVIDE ( [Gross Profit], [Total Revenue] ), percent format. Checkpoints: $38,714,371.79 · 57.94%. Order Count = DISTINCTCOUNT ( Sales[OrderID] )andAverage Order Value = DIVIDE ( [Total Revenue], [Order Count] ). Checkpoints: 85,538 · $781.10.- Drop
[Gross Margin %]into a table against Category and read the five values. Checkpoint: they differ — one definition, five filter contexts. Which category surprises you? Hold that thought for Medium.
Hint — RELATED errors with "cannot find table"
Either the sales→products relationship is missing (Model view first), or RELATED is written outside row context — it must sit inside the SUMX's expression, not wrap the whole thing.
Reflection
- Steps 2 and 3 produced identical numbers by different routes. Which would you rather maintain in a model refreshed nightly for three years, and why?
- Step 7's five margins came from one formula. Where did the "five-ness" come from?