Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Issue relating 2 tables

I connect to an SQL db. there are 2 tables, TRANSACTIONS & TRANSACTIONENTRY

 

there are 2 common columns in both tables, storeID and TransactionNumber.

 

the relationsship in sql is made using both columns, if you combine a storeID and TransactionNumber then they will be unique.

 

How can i make the relatioship work in power bi. 

 

i am unable to connect both tables, the only possible relationship is MANY TO MANY. can anyone tell me how to connect

 

 

Thanking you for help

2 Replies

  • Mariusz's avatar
    Mariusz
    Community Champion

    Hi Anonymous 

     

    You can merge the two table using SQL into one or do it in Query Editor.

    If the above is not an option in your scenerio, then you can use the Query Editor to Add custom Column to each table and concatenate these two fields there, this will create a unique identifier that you can later use to build a relationship.

     

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski

     

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

    Hi Anonymous 

     

    If you've fixed the issue by your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly. thanks!