Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
FancyOgre
New Member

Create Relationship Between Three Tables

Hello Everyone !

I am trying to create a relationship between my tables in power query. I have three tables. The first table has name and address field.

Screenshot_20230720-193512_Microsoft_365_(Office).png

And The Second Table has Name, Address, Income Amount and Date on which the income was received.

Screenshot_20230720-193640_Microsoft_365_(Office).png

The Third Table contains Name, Address, Expense and the date on which the expense happened.

Screenshot_20230720-193549_Microsoft_365_(Office).png

Now I'm trying to create Relationships between these table so that i can create a report where it show the name of user and the income he/she has received and how much he has spent as expense. However, since the income and expense table contains duplicate values of Name and Address, i am unable to create a relationship between Income and Expense table. I am able to create Relationships between Table 1( with name and address) and income table and also between Table 1 and Expense Table but i have not been able to create Relationship between income and expense table to achieve my desired result. Is there any way forward to this ?

1 ACCEPTED SOLUTION
rubayatyasmin
Community Champion
Community Champion

Hi, @FancyOgre 

 

you can create relationship like this, less workaround. (might be error-prone)

rubayatyasmin_0-1689863746082.png

sample value

rubayatyasmin_1-1689863769576.png

 

power bi actually auto created the relation. i tried to visualize 

 

rubayatyasmin_3-1689863808014.png

it is giving the correct value.

 

if you do not want to do this way then you might consider creating a composite key in both table. then create a relationship using that key. and best practice? create a date table and add a relationship with the date column. 

 

rubayatyasmin_0-1689517080227.png

 

 

 

 

 

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


View solution in original post

3 REPLIES 3
rubayatyasmin
Community Champion
Community Champion

Hi, @FancyOgre 

 

you can create relationship like this, less workaround. (might be error-prone)

rubayatyasmin_0-1689863746082.png

sample value

rubayatyasmin_1-1689863769576.png

 

power bi actually auto created the relation. i tried to visualize 

 

rubayatyasmin_3-1689863808014.png

it is giving the correct value.

 

if you do not want to do this way then you might consider creating a composite key in both table. then create a relationship using that key. and best practice? create a date table and add a relationship with the date column. 

 

rubayatyasmin_0-1689517080227.png

 

 

 

 

 

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


I'm getting this error: The relationship you're creating lets you filter Income by Table1. but Excel 16.0 allows only one filtering path between tables in a Data Model. Deactivate existing relationships between the tables or change their filter direction. This relationship can be as inactive.
Mkarwa-123
Resolver II
Resolver II

@FancyOgre you dont need a relationship between income and expense table. Create a relationship of firsttable with income and expense separately also create a date table and create a relationship with income and expense with date table. 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.