Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
CKK
New Member

How to join 2 table that has many-to-many relationship

Hi all,

My question is below. I have two tables connected to each other with "Order" column and many-to many relationship. I want to get a new table shown as below. Is there any way to have it? I am a newbie so, if it is a dumb question, sorry about that.

 

Thanks in advance.

 

CKK_0-1707641982488.png

 

2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

It is for creating a new table.

 

Jihwan_Kim_0-1707662395255.png

 

Jihwan_Kim_1-1707662749241.png

 

GENERATE function (DAX) - DAX | Microsoft Learn

 

Expected result table = 
GENERATE('Table 1', SUMMARIZE('Table 2', 'Table 2'[Operation]))

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

Anonymous
Not applicable

Hi @CKK 

 

You can use Merge to achieve this effect.

vxuxinyimsft_0-1707731754419.png

 

vxuxinyimsft_1-1707731840057.png

 

Delete the Order column

vxuxinyimsft_2-1707732158625.png

Is this the result you expect?

 

For more details, you can read related document link: Merge queries overview - Power Query | Microsoft Learn

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @CKK 

 

You can use Merge to achieve this effect.

vxuxinyimsft_0-1707731754419.png

 

vxuxinyimsft_1-1707731840057.png

 

Delete the Order column

vxuxinyimsft_2-1707732158625.png

Is this the result you expect?

 

For more details, you can read related document link: Merge queries overview - Power Query | Microsoft Learn

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

It is for creating a new table.

 

Jihwan_Kim_0-1707662395255.png

 

Jihwan_Kim_1-1707662749241.png

 

GENERATE function (DAX) - DAX | Microsoft Learn

 

Expected result table = 
GENERATE('Table 1', SUMMARIZE('Table 2', 'Table 2'[Operation]))

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
talespin
Solution Sage
Solution Sage

Hi @CKK 

 

No need to be sorry, create three tables instead. Avoid Many to Many relationships.

 

Table1 unique parts

Table 2 unique operations

Table 3 Orders

 

Join Table1 and Table2 to Table3 using One-Many relationship.

 

You do not need to create a combined table, what is it you want to do with combined table?

Problems with combined table

- Additional storage.

- Slow refresh time.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.