Define Relationships in Power BI Desktop


April 26, 2023 - by

Define Relationships in Power BI Desktop

Power Pivot was revolutionary in Excel 2010 because of three things:

  • Define relationships between two tables
  • Add a new measure (or calculated column) to a pivot table using DAX formulas.
  • Add a new column to a table using DAX formulas

Those three tools are available on the Modeling tab in Power BI Desktop.

On the Modeling tab in Power BI Desktop, you have Manage Relationships, New Measure, New Column, New Table.
Figure 1095. The Power Pivot tools are on the Modeling tab.

Choose Modeling, Manage Relationships. Power BI already detected the relationship from Sales to Geography. You have choices to Add, AutoDetect, Edit or Delete a relationship.

Choose Add to create a relationship between the Sales data and the Calendar table.



Open the top drop-down and choose the Sales table. A list of fields will appear. Click on the Date heading to choose the key field in the Sales table.

Open the second drop-down and choose the Calendar table. A list of fields will appear below this drop-down. Click on the heading for the Date column.

Review the settings for Cardinality and Cross Filter Direction. Click OK.

To create a relationship between Sales and Calendar1, select Sales from the top drop-down in the Create Relationship dialog. Choose Calendar1 from the second table. Click on the Date heading in both tables. Click OK.
Figure 1096. Define a relationship between two tables.

This article is an excerpt from Power Excel With MrExcel

Title photo by Markus Winkler on Unsplash