Home » Power BI » Create and manage relationships in Power BI

Create and manage relationships in Power BI

Relationships examples in Power BI

When you import two or more tables in Power BI, Relationship between those tables creates a very important roles in order to display correct calculation values & information in Power BI reports.

Power BI is very smart tool, based on same column name Power BI autodetect feature attempts to find and create relationships for you and sometimes you might have to create relationships manually.

Also, you can create, edit or remove the relationships to using Manage relationships under Modeling tab.

Consider following two tables-

Table: Price

Product Price
Bike 20000
Car 500000
AC 30000
Bus 1500000

Table: Orders

OrderID Product Qty
1 Bike 12
2 Car 11
3 AC 3
4 Bus 5
5 AC 1
6 Bus 2
7 Bike 1

Now let’s assume, you want to see Total price for products against each OrderId, so for  this you need price of each products, then you can multiply each product Qty with their price to get the Total Price.




You can get the Product price from Price table but it is not possible without relationship between both tables. And this is the reason why relationships are necessary between tables.

Create a relationship with autodetect

Power BI autodetect feature attempts to find and create relationships for you, if you noticed above mentioned both tables Product column name are same.

So, autodetect feature will automatically create a relationship between both tables based on Product column. You can see the same in below screen shot-

Relationship example in Power BI

Relationship example in Power BI

Now right click to yellow highlighted relationship line and click on Delete, after that click on Manage relationships.

You can see in above screen shot relationships between both tables has been deleted, now click on Autodetect button.

Manage Relationship Autodetect

Manage Relationship Autodetect



After that one dialog box appears with success message, closed this box and in second screen you can see the the relationship between both tables.

Auto detect relationship in Power BI

Auto detect relationship in Power BI

Edit a relationship

You can Edit the Relationship in many ways-

Way-1: Go to Modeling tab in Power BI header menu > select Manage Relationships > In the Manage relationships dialog box, select the relationship, then select Edit.

Way-2: Inside Model view  double click on Relationship line >Edit relationships dialog box appears.

Way-3: Inside Model view > Click on Home tab, select Manage Relationships > In the Manage relationships dialog box, select the relationship, then select Edit.

Edit Relationships in Power BI

Edit Relationships in Power BI



Create a Relationship Manually in Power BI-

Way-1: Inside Model view > Click on Home tab, select Manage Relationships > In the Manage relationships dialog box, select New.

New Relationship in Power BI

New Relationship in Power BI

After that create relationship dialog box appears, select both tables in each dropdown and select Product column from both tables then click on OK button.

New Relationship PowerBI

New Relationship Power BI

Way-2: Go to Modeling tab in Power BI header menu > select Manage Relationships > In the Manage relationships dialog box, then select New.

Delete Relationship in Power BI-

-Under Model view, right click on Relationship line and select Delete.

-Delete through Mange Relationships dialog box.

Hope you enjoyed the post. Your valuable feedback, question, or comments about this post are always welcome or you can leave us message on our contact form , we will revert to you asap.



Leave a Reply