Forum Discussion
Anonymous
8 years agoNot applicable
Join tables based on multiple columns
Hi, I have two tables . PowerBI does not let me join these tables as they do have unique values in one of the columns. In SQL I would join these tables based on two columns. Table 1 acco...
- 8 years ago
Hey,
in the query editor
- duplicate the columns that you want to use for the join
- mark the duplicated columns you want to use for the join, choose "Merge columns" from the context menu.
Here is a screenshot:
Repeat this for the 2nd table.
Now you are able to use this column to create a relationship between both tables
Don't forget to "hide" this column from report view.
Hopefully this answers your question
Regards
Tom
danobri
6 years agoNew Member
MichaelHenry Thank you for posting this! Did you find this in Microsoft's official documentation? If so, would you be willing to post a link to the page?
Thanks!
MatjoCol
6 years agoFrequent Visitor
You can acually do this in the merge query editor. If you press control while selecting columns there is a small digit indicating the order displayed for each column allowing you to join on as many columns as you want.
/Cheers