Forum Discussion

suoko's avatar
suoko
Regular Visitor
8 years ago
Solved

Many to Many relationship

Hi,

 

I'm trying to restore my memories about dbs back into place.

I got two simple tables and I want them to be "connected"

 

TABLE 1

user 1; group 1
user 1; group 2
user 2; group 2
user 2; group 3

 

TABLE 2
group 1; link 1
group 1; link 2
group 1; link 3
group 2; link 1
group 2; link 3
group 2; link 4
group 3; link 5

 

The result should be this

 

RESULT TABLE

user 1; group 1; link 1
user 1; group 1; link 2
user 1; group 1; link 3
user 1; group 2; link 1
user 1; group 2; link 3
user 1; group 2; link 4
user 2; group 2; link 1
user 2; group 2; link 3
user 2; group 2; link 4
user 2; group 3; link 5


What is the fastest way to obtain this in powerquery without DAX ? 

Or, is there a "complete" DAX composer ?

  • Hi suoko,

     

    Based on my test, you should be able to simply use the Merge Queries option in Query Editor to get the expected result in your scenario. For more details about how to use Merge Queries option with Power BI, you can refer to this article. :smileyhappy:

     

    Regards

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    You may be able to do that join in Power Query but you could also create a bridge table to do it I believe. And then it is just tabular relationships.

  • v-ljerr-msft's avatar
    v-ljerr-msft
    Microsoft Employee

    Hi suoko,

     

    Based on my test, you should be able to simply use the Merge Queries option in Query Editor to get the expected result in your scenario. For more details about how to use Merge Queries option with Power BI, you can refer to this article. :smileyhappy:

     

    Regards