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
Anonymous
6 years agoNot applicable
Hi All,
Just wondering if merging/concatenating columns is the only way to join tables based on multiple columns?
As this creates additional columns which is slowing down and making my report heavier.
Any update please?
Thanks
Robin
- danobri6 years agoNew Member
Anonymous - did you see the post from MichaelHenry from 3/8/2020? All you have to is pass arrays of column names for the key parameters like in the example MichaelHenry provided:
JoinedData = Table.Join(AgeData, {"First","Last"}, OccupationData, {"First","Last"})