DEV Community

Joan Wambui
Joan Wambui

Posted on

Understanding Data Modeling in Power BI: Joins, Relationships, and Schemas Explained

What Is Data Modeling?

Data modeling refers to how one organises and connects their data so it can be analysed correctly. In Power BI, it defines how tables relate to each other, how filters move across visuals, and how your measures calculate results.

Joins

Joins combine data from two tables based on a shared column. In Power BI, joins happen in Power Query Editor before data enters the model.
INNER JOIN - Returns only rows with a match in both tables.
LEFT JOIN - Returns all rows from the left table only.
RIGHT JOIN - Returns all rows from the right table only.
FULL OUTER JOIN - Returns everything from both tables. Useful for spotting data gaps.
LEFT ANTI JOIN - Returns only rows from the left table with no match on the right.
RIGHT ANTI JOIN - Returns only rows from the right table with no match on the left.

Joins in Power BI

Power BI Relationships

Relationships connect tables inside the model without merging them. They control how filters move between tables when you interact with visuals.
Cardinality defines how rows relate across tables:
One-to-Many (1:M) - One customer, many orders. The most common type.
Many-to-Many (M:M) - Requires careful handling, best resolved with a bridge table.
One-to-One (1:1) - Usually means the tables can be merged.

Active vs Inactive relationship - Only one active relationship is allowed between two tables. Inactive relationships are triggered using USERELATIONSHIP() in DAX when needed.

Cross-filter direction - Single direction is the default and safest. Bidirectional filters flow both ways but can cause performance issues if overused.

Joins vs Relationships

Joins vs Relationships

Fact Tables vs Dimension Tables

Fact tables hold measurable data such as sales and transactions. They are long with many rows and link out to dimension tables via foreign keys.
Dimension tables hold descriptive data such as customer names, product categories, dates. They give context to the numbers in your fact table.
In simple terms, your fact table is the center. Dimension tables surround it.

Schemas

Star Schema - One fact table connected directly to multiple dimension tables. Fast, clean, and what Power BI is optimised for. This should be used by default.
Snowflake Schema - Dimension tables broken into sub-dimensions. This is more complex and slower in Power BI. It is recommended for one to use only it when source data is already normalised.
Flat Table - Everything in one table. This is simple but it creates redundancy and performance problems at scale.
Pro Tip:

A clean data model is what makes a Power BI report trustworthy. Start with a star schema, separate your facts from your dimensions, define your relationships carefully, and always build a proper Date table. The model is invisible to the end user, but it is what everything depends on.

Top comments (0)