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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jimmyfromus
Helper III
Helper III

Unsure how to create a relationship

Hi, 

 

I have 2 tables. 

 

The first table looks like this: 

contact/company           contactid            companyid
company a                                                  7
company b                                                 8
company c                                                  9
contact a                           4  
contact b                           5  
contact c                           6  

 

The second table like this: 

 

contact           contactid         company                companyid
contact a         4                    company a                   7
contact b         5                    company b                  8
contact c         6                    company c                   9


If I create a relationship between the 2 tables via the contactid, I can click on a contact, contact a for example, in table 1 and the contact a in table 2 will also react. I would however like that when I click on a company (company a for example) in table 1, the same line with company a and contact a will react in table 2. Is there a way to do this? Thank you. 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@jimmyfromus solution attached, tweak it as you see fit.

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

4 REPLIES 4
parry2k
Super User
Super User

@jimmyfromus solution attached, tweak it as you see fit.

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@jimmyfromus the solution provided by @PaulDBrown  is the way to go for it. I created two different dimension tables from table 1 and then created a relationship with the 2nd table on ids and then it is all good.

 

See attached solution file, there are many tables in it, just focus on page 4 and the tables related to it

 

Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

PaulDBrown
Community Champion
Community Champion

@jimmyfromus 

I suggets you create 2 dimension tables directly from Table 2: one for Contacts and the other for Companies.

If you join these dimension tables with Table 2 in one-to-many relationships, you can use either or both of these dimension tables as slicers or filters to filter the rows in Table 2.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






@PaulDBrown @parry2k Thank you but not quite. I've added my first and second table to the pbix file. Is there a way to click on a company or company in the first table so that they are highlighted in the second table? The slicers unfortunately aren't an option here. Thanks again. 

Download pbix 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors