Business Intelligence with Power BI

L06 · DAX II: CALCULATE and Time

Practice — Medium · Wiring the Targets

Skills focus. Conformed dimensions, the targets join, attainment — and one deliberately planted bug you will build, watch fail, and fix.

Ungraded. Continue from Mild's model.

Part 1 — The join

  1. Build Regions = DISTINCT ( Stores[Region] ) and Categories = DISTINCT ( Products[Category] ); relate each to its two homes (Regions → stores and targets; Categories → products and targets). Checkpoint: 6 and 5 rows.
  2. Load targets.csv; relate TargetMonthDates[Date]. Checkpoint: 1,080 rows, and the model diagram now has no islands.
  3. Measures: Target Revenue = SUM ( Targets[RevenueTarget] ) and Attainment % = DIVIDE ( [Total Revenue], [Target Revenue] ). With Year = 2026: Checkpoint: 107.39% overall.
  4. Bar: Attainment % by Category (from the Categories dimension), 2026. Checkpoint: Kitchen & Dining leads at 109.1%; Decor trails at 103.8%; every bar above 100%.

Part 2 — The planted bug

  1. Create a second measure, exactly as written: % of Total BROKEN = DIVIDE ( [Total Revenue], CALCULATE ( [Total Revenue], ALL ( Sales ) ) ) — note: ALL over the whole fact.
  2. Put it and your correct % of Total Revenue side by side in the category table, with the Year slicer set to 2025. Describe what differs, and why the broken column's numbers are so much smaller.
  3. Delete the broken measure. (It was built to be seen failing, not to survive.)

Reflection

  • Part 1's category attainment ordering (K&D best, Decor worst) differs from every ranking you have seen — revenue, units, margin, and now attainment each crown someone else. What single sentence explains why rankings keep disagreeing?
  • The broken measure divided by all-time revenue while the visual showed 2025. Which earlier lesson's mistake is this the CALCULATE-flavored version of?