cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
raeldor
New Member

Create Relationship on Compound Key

So, can someone tell me why I can't join tables on more than one key?  This seems like one of the most basic query functions yet it can't be done.  I see people saying 'create a calculated column', but how is that efficient?  Now the whole think becomes text and I likely need to pad the ID fields too to avoid incorrect keys.

5 REPLIES 5
v-xjiin-msft Solution Sage
Solution Sage

Re: Create Relationship on Compound Key

@raeldor

 

In current Power BI, there exists a limitation for relationship that you can’t create relationship based on more than one column. 

 

To workaround this limitation, we can concatenate these related columns into one calculated column, then create relationship based on this concatenate column. Please refer:

 

1.PNG

 

2.PNG

 

Reference: Relationship in Power BI with Multiple Columns 

 

Thanks,
Xi Jin.

raeldor
New Member

Re: Create Relationship on Compound Key

So, I know HOW to do it.  The question is really... why do I need to?

v-xjiin-msft Solution Sage
Solution Sage

Re: Create Relationship on Compound Key

@raeldor

 

This is the limitation for relationship in current Power BI and it is by design. Smiley Sad

 

Thanks,
Xi Jin.

Highlighted
raeldor
New Member

Re: Create Relationship on Compound Key

A little odd considering every relational database I've ever seen allows multi-field joins.  Seems a little unfair making users jump through hoops to do something so common. 😞

marianadinf
Regular Visitor

Re: Create Relationship on Compound Key

You can do it in M. If you choose in your transformation in Home/ "Merge Queries", you can highlight the 2 columns to match in both sides of the join.

 

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors