Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago

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's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity 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's avatar
    v-ljerr-msft
    Icon for Microsoft Employee rankMicrosoft 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's avatar
    skasper
    Icon for Responsive Resident rankResponsive 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.

    • Anonymous's avatar
      Anonymous
      Not 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