Business Intelligence with Power BI

L04 · The Data Model

Assignment A04 — Build the Star

Skills assessed. Loading a multi-table universe · creating relationships with correct cardinality and direction · declining the many-to-many trap · proving the star works with a cross-fact visual.

Submit: A04_LastFirst.pbix. Worth 20 points. This file becomes your working model for Lessons 5 and 6 — build it like you will live in it, because you will.

Scenario

The flat files are retired. Operations wants one model that can answer sales questions, returns questions, and — pointedly — questions that cross both, like the return-rate analysis the old extract could never touch.

Requirements

  1. Load five tables from datasets/clean/: sales.csv, returns.csv, products.csv, stores.csv, customers.csv. Verify row counts: 165,042 · 6,599 · 240 · 39 · 8,000.
  2. Create exactly five relationships, each many-to-one, single direction:
    • sales → products (ProductID) · sales → stores (StoreID) · sales → customers (CustomerID)
    • returns → products (ProductID) · returns → stores (StoreID)
    Before each: run the ten-second key check on the "one" side.
  3. Do NOT relate returns to sales. If auto-detect created an OrderID relationship, delete it. The grader checks for its absence by name.
  4. Arrange Model view as a readable star: facts central, dimensions around. (Ungraded mechanically — but you will thank yourself in Lesson 6.)
  5. Prove the star on one report page:
    • Card: sum of Quantity from sales — 259,421
    • Card: sum of QuantityReturned from returns — 8,334
    • Bar chart: QuantityReturned by CategoryCategory from the products table, not from any column on returns. Lighting leads at 1,910.
    • Slicer: Region from stores. Test: selecting a region must move both cards — that is two facts answering one dimension, the star working.
The bar chart is the point Putting products.Category against returns.QuantityReturned only works if the returns → products relationship exists and flows. If the bar chart shows one bar labeled "blank," your relationship is missing or misdirected — the visual is diagnosing your model.

Checklist (what the grader checks)

#CheckPoints
1Five tables loaded with verified row counts3
2Five relationships, correct columns, many-to-one, single direction6
3No relationship between returns and sales2
4Card: units sold = 259,4212
5Card: units returned = 8,3342
6Bar: returns by products.Category, Lighting top at 1,9103
7Region slicer filters both cards1
8File named A04_LastFirst.pbix1

Before you submit

  • Click every region in the slicer. Both cards must move every time. A card that sits still is a fact the filter cannot reach — trace the relationship path and find the break.
  • Open Model view one last time and explain each line to yourself out loud: which side is the one, why, and which way the filter flows. If any line resists explanation, it does not belong in the model.
  • Save, close, reopen, verify.