Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

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.

Frequent Visitor

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.


@marianadinf what next? I merged the tables using 3 columns "Merge Queries" and "Merge Queries as New". With the first option it appears as a new column labled "Table", but I can't figure out how to add this data to the dashboard. When using "Merge Queries as New", a new table is created, but a) It doesn't have all columns, and b) the tables don't seem to be linked.

My expectation is that when I select a row in the "Parent" table visual, the "Child table" is filtered with just those rows.







When I select a row in "Parent", "Child" only shows two rows.

Hi sorry only seeing this now - just expand the column (seems your are only clicking the record) and you should see everything (check the type of join too, by default left outer join)

Solution Sage
Solution Sage



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:






Reference: Relationship in Power BI with Multiple Columns 


Xi Jin.

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



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


Xi Jin.

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. 😞

Helpful resources

June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors