Business Intelligence with Power BI

L04 · The Data Model

Practice — Mild · Solution

Checkpoints, verified

CheckResult
Row countssales 165,042 · returns 6,599 · products 240 · stores 39 · customers 8,000
KeysProductID 240=240 ✓ · StoreID 39=39 ✓ · CustomerID 8,000=8,000 ✓ · sales.OrderID 165,042 vs 85,538 ✗ (grain, not key)
RelationshipsFive, all *:1, single direction, dimension → fact
Card259,421 units
BarLines by category: Lighting 38,369 · Kitchen & Dining 34,900 · Outdoor 33,689 · Furniture 30,481 · Decor 27,603

Reflection answers

  • Power BI would refuse to treat the non-unique column as a "one" side — or, if forced through a workaround, offer many-to-many, the multiplying trap. The key check predicts the dialog's behavior before you meet it: cardinality is a fact about your data, and you can know it first.
  • The relationship is doing the merge's job — at query time, per visual, without materializing a wider table. Lesson 3's merge baked Category into rows once; the model looks it up live, every time, for every visual, and stays current when products change. Same concept, better machinery — which is why modeling replaced merging the moment we had more than one fact.