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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
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.

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.
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.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (25)