Forum Discussion
how to create a relationship between two tables through two fields on each side?
I have to relate two tables in power two and for that I need to use two columns of each table in anteriore versions of power bi desktop I could do it easily just by holding down the Ctrl key and select the fields to be related, however I can not do more so, how can I do?
4 Replies
- Greg_Deckler
Community Champion
Are you sure that you are not thinking about the Merge dialog in Power Query, which allows you to do this? I'm not aware that ever existed for building relationships. Generally, I just use a CONCATENATE for my two fields in my tables and then relate them on those new fields.
- v-ljerr-msft
Microsoft Employee
Hi Anonymous,
I agree with smoupre. I haven't seen this option to create the relationship before either. Usually we need to create a new combination key in this scenario as smoupre mentioned above.:smileyhappy:
Regards
- skasper
Responsive Resident
The previous replies are correct. There is no way to create a relationship based on two columns in one table. To do so, you need to create a new column, combining the values of the other two and use this for establishing the relationship.
- AnonymousNot applicable
I may have confused me but at some point I could somehow make this relationship work, will create a noca concatenated column to make this key then, thank you