Forum Discussion

jaryszek's avatar
jaryszek
Super User
4 years ago

How to create bridge table with composite keys

Hi,

 

i have found on web solution with bridge with 1 column. 

But what if my table should have more than 1 column as composite key? 
How to do this?

Best,
Jacek

4 Replies

  • Ok,

    in Access relationships would like like:

    Form:

     

    and in power BI i have something like here:

     

    Should i use Bridge table in this case or just create relationships many to many instead? 

    What is a good practice in this case?

     

    Best,
    Jacek

     

     

     

  • v-luwang-msft's avatar
    v-luwang-msft
    Community Support

    Hi jaryszek ,

    Are you trying to create a relationship between two tables with multiple columns? Is the relationship created as and or? For example, if the key column 1 in table 1 is the same as the key column 1 in table 2, but the key column 2 in table 1 is not the same as the key column 2 in table 2, how would that be displayed?

     

    And refer:

    https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-create-and-manage-relationships 

     

     

    Best Regards

    Lucien

    • jaryszek's avatar
      jaryszek
      Super User

      Hi Lucien,

       

      please see screens attached from Access to reproduce my issue. I have relationship created based on 3 fields, not 1. 

       

      Best,
      Jacek