TECHNOLOGIESTieInn Technologies

Relationships and the data model

Power BI · 12 questions

Short notes

Key idea

The data model links tables with relationships so one filter flows to every related table. The best shape is a star: one fact table of events in the middle, dimension tables (date, customer, product) around it.

Syntax

  • Model view: drag a key from one table onto the matching key in another.
  • Cardinality: one-to-many (dimension 1 → fact *) is the normal case.
  • Cross-filter direction: single (dimension filters fact) by default; avoid "both" unless you need it.
  • Mark as date table: Table tools → Mark as date table, using a continuous date column.

Example

Orders (fact) joins Customers on customer_id and Date on order_date. A slicer on Customers[City] now filters the orders total, and a visual by Date[Month] shows that city's monthly trend.

Traps

  • Duplicate keys in a dimension stop a one-to-many relationship being created.
  • Bidirectional filters can make totals ambiguous and slow.
  • Only one active relationship between two tables; the others are dashed and need USERELATIONSHIP in DAX.
  • Using the fact table's own date column instead of a date table breaks time intelligence.

Want the full lesson with step-by-step examples, a project and a certificate? Power BI course, ₹120 →

Questions

5 free questions
5 questions

    Relationships and the data model

  1. Question 1easy

    What's the usual cardinality between products and order_items?

  2. Relationships and the data model

  3. Question 2medium

    In a star schema, which way should filters usually flow?

  4. Relationships and the data model

  5. Question 3medium

    Why add a separate calendar (Date) table instead of using orders[order_date] directly?

  6. Relationships and the data model

  7. Question 4hard

    orders has both order_date and shipped_date related to the Date table. Only one can be active. How do you count orders by ship date?

  8. Relationships and the data model

  9. Question 5easy

    Why not merge customers, products and orders into one wide table in Power BI?

7 more questions on this topic, with hints, and tests

Sign up free for 21 days of every question and test.