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
USERELATIONSHIPin 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- Question 1easy
What's the usual cardinality between
productsandorder_items? - Question 2medium
In a star schema, which way should filters usually flow?
- Question 3medium
Why add a separate calendar (Date) table instead of using
orders[order_date]directly? - Question 4hard
ordershas bothorder_dateandshipped_daterelated to the Date table. Only one can be active. How do you count orders by ship date? - Question 5easy
Why not merge customers, products and orders into one wide table in Power BI?
Relationships and the data model
Relationships and the data model
Relationships and the data model
Relationships and the data model
Relationships and the data model
7 more questions on this topic, with hints, and tests
Sign up free for 21 days of every question and test.