Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to create relationship between these tables

Hi Everyone,

 

I have two tables with only the supplier names field common in both, however I am trying to join them so that I can show the Spend Value in the Product table but I couldn't. I tried to use the RELATED or RELATEDTABLE functions but It didnt wont as both table could not connect in the model (here's the message I receive when I try: "you can't create a relationship between these two colums because one of the columns must have uniques values").

 

Your assistance will be highly appreciated!

 

Supplier Table:

Supplier NameSpend
AG Enterprises$4500
 Lenix$6000

 

Product Table:

Product IDSupplier NameQuantityPurchase Date
1AG Enterprises4421-01-2020
2Lenix6722-01-2020
3AG Enterprises3327-01-2020
  • Hi Anonymous 

    you can try to create a bridge calcualted table

    bridge Table = DISTINCT(Supplier Table[Supplier Name])

    then relate it to both of your tables

2 Replies

  • az38's avatar
    az38
    Community Champion

    Hi Anonymous 

    you can try to create a bridge calcualted table

    bridge Table = DISTINCT(Supplier Table[Supplier Name])

    then relate it to both of your tables

    • Anonymous's avatar
      Anonymous
      Not applicable

      It worked perfectly! Thanks.