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
morani
1 year agoHelper I
Thanks for the tip! I have a question regarding "relationship", is it like "join" in SQL? If it is, what would be the equivalent in "relationship" to inner join/ outer join?
shinypurple
1 year agoFrequent Visitor
I usually write sql in ssms to create tables in powerbi. When multiple fields make up the PK, I do a CONCAT field in the sql query and use that in powerbi to join tables