Business Intelligence with Power BI

L06 · DAX II: CALCULATE and Time

Practice — Medium · Solution

Part 1 — verified figures

CategoryAttainment %, H1 2026
Kitchen & Dining109.08%
Outdoor108.92%
Lighting108.89%
Furniture105.82%
Decor103.79%

All five clear 100% — consistent with the region view — but the spread matters: Kitchen & Dining is beating its plan by three times Decor's margin over plan.

Part 2 — the bug, described

With 2025 selected, the correct measure's column still sums to 100%: its denominator removed only the category filter, so both numerator and denominator live inside 2025. The broken measure's denominator — ALL over the whole sales fact — removed the year filter too, dividing 2025 category revenue by all-time total revenue ($66.81M). Its "shares" sum to roughly 31%, because 2025 is roughly 31% of all-time revenue. Nothing errored; the numbers were merely quietly answering a question nobody asked. Remove exactly the filters you mean to remove.

Reflection answers

  • The sentence, by now familiar enough to frame: every ranking is an answer to a different question, and "best" without a measure attached is not a question. Revenue ranks size, units rank volume, margin ranks efficiency, attainment ranks performance against expectation — the same five categories, four honest orderings.
  • It is the unequal-windows YoY mistake (and its cousin, the frozen percent-of-total column from the L05 quiz): comparing numbers computed in mismatched contexts. CALCULATE makes context editable, which makes mismatching it easier and quieter — the power and the responsibility arrive together.