Module 3 - Building Data Models & Relationships
Module 3 - Building Data Models & Relationships
in Power BI
Introduction
Data modelling is a crucial step in Power BI that allows you to create relationships
between tables, define calculations, and optimize performance for data analysis. This
module covers essential concepts to help you build a strong foundation in Power BI
data modelling.
Example:
CustomerID CustomerName
Best Practices:
✅ Use a star schema for better performance. ✅ Avoid using raw, unstructured data
directly in reports. ✅ Ensure data types are correctly assigned (e.g., Date, Integer,
Text).
Example Relationship:
Best Practices:
✅ Always use unique keys for relationships. ✅ Use single-direction filtering when
possible for performance. ✅ Avoid unnecessary Many-to-Many relationships.
Example:
CustomerID CustomerName
1 101 200
2 101 150
3 102 300
Example:
CustomerID CustomerName
ProductID ProductName
5001 Laptop
5002 Phone
CustomerID ProductID
101 5001
102 5002
101 5002
Best Practices:
What is a Schema?
Snowflake Schema ❄️
● Extension of Star Schema, where dimension tables are further normalized.
● More complex structure, better for large datasets.
● Example: A product table is linked to a category table instead of keeping the
category in the same table.
Best Practices:
✅ Use Star Schema whenever possible. ✅ Snowflake only when dealing with very
large datasets. ✅ Reduce unnecessary joins for better performance.
A calculated column is a new column added to a table using DAX (Data Analysis
Expressions).
Example:
Adding a Full Name column by combining First Name & Last Name.
Full Name = Customers[First Name] & " " & Customers[Last Name]
Example:
Best Practices:
✅ Use DAX Measures instead of calculated columns when possible. ✅ Avoid creating
too many calculated columns for better performance. ✅ Keep calculated tables
minimal to optimize query performance.
Conclusion
Building a strong data model is the foundation of any Power BI report. By
understanding tables, relationships, schema design, and calculated fields, you can
optimize your Power BI performance and unlock powerful data insights.
What’s Next?
In the next module, we’ll dive into DAX (Data Analysis Expressions) and how to write
🚀
powerful formulas for analysis. Stay tuned!