Power BI 101 Relationship
Power BI 101 Relationship
Relationships
in Power BI
1
Relationships in Power BI
1. One-to-One [1 : 1]
2. One-to-Many [1 : *]
3. Many-to-Many [* : *]
1
1
2
1. One-to-One[ 1 : 1 ]
Consider Denormalization
Bridge Tables
Many-to-One (*:1]
One-to-One (1:1]
4
5
Benefits of Denormalization
1. Denormalization can simplify your data
model by merging tables in a One-to-
One relationship, improving
performance but potentially introducing
some redundancy and complexity.
2. Simplified Model: Fewer tables to
manage.
3. Improved Performance: Faster queries
by reducing joins.
4. Easier Data Retrieval: All relevant data
in one table.
6
When to Use
3. Identify opportunities to
denormalize and streamline your
tables for improved efficiency.
7
Drawbacks
inconsistencies.
2. Data Integrity: Harder to maintain
consistency.
3. Scalability Issues: Large tables can
become unwieldy.
8
2. One-to-Many [ 1 : * ]
9
One-to-Many [ 1 : * ]
10
One-to-Many [ 1 : * ]
Best Practice:
11
3. Many-to-Many [ * : * ]
Happens when multiple records in one table can
relate to multiple records in another.
1. Students and Courses
A student can enroll in multiple courses, and a
course can have multiple students.
12
Many-to-Many [ * : * ]
The Products Table To The Stores Table,
With The Product-Store Bridge Table. Each
Product Can Be Available In Multiple Stores,
And Each Store Can Stock Multiple Products
Bridge Table
13
Why is it a Problem in Power
BI?
14
How to manage Many-to-
Many relationships
Students and Courses
Scenario: A student can enroll in multiple courses, and a
course can have multiple students (many-to-many).
1. Using a Bridge Table (Junction Table)
15
How to manage Many-to-
Many relationships
Scenario: A salesperson can operate in multiple
regions, and a region can have multiple salespeople.
Instead of maintaining a many-to-many relationship
between Salespeople and Regions, Aggregate the data
to summarize the number of sales per region.
16
How to manage Many-to-
Many relationships
Aggregating Data to Remove Duplicates
17
Key Takeaways
Use Star Schema Whenever Possible
Optimize Cardinality
18
Thank You!