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

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

Reply
Anonymous
Not applicable

Add 2nd table list to row on 1st table based on common key then expand

I have 2 tables with the following data:

Table 1 -  Issues table

Issue Project
10010
6005
30012
4008
50010
61012
3015
3025

 

Table 2 - Holds relationship of product areas to a project

 

ProjectProduct Area
12pa_50
12pa_52
12pa_45
10pa_16
10pa_12
8pa_100
5pa_11
5pa_55

 

I want to get to: Table 1 being

IssueProjectProduct Area
10010pa_16
10010pa_12
2005pa_11
2005pa_12
30012pa_50
30012pa_52
30012pa_45
4008pa_100
50010pa_16
50010pa_12
60012pa_50
60012pa_52
60012pa_45
3015pa_11
3015pa_12

 

The reasons for this is I want to filter on Product Area in the final report. I will handle the duplicates with measures.

 

I can't get table 1 to join with table 2 on Project. It says I can't join m & m.

 

I think I need to move table 2 rows in as a comma separted list on each row of table 1 based on the project.

 

Then I need to expand each list getting the resulting rows. How does one do this in the UI so the m-code is correct.

 

Thanks!!!

1 ACCEPTED SOLUTION
DebbieE
Community Champion
Community Champion

I have added the two tables to a pbix file

Merge.JPG

And gone for a merge.

Merged.JPG

And there doesnt appear to be any problems for me either.  Are you trying to join them in the actual data model?

View solution in original post

8 REPLIES 8
DebbieE
Community Champion
Community Champion

I have added the two tables to a pbix file

Merge.JPG

And gone for a merge.

Merged.JPG

And there doesnt appear to be any problems for me either.  Are you trying to join them in the actual data model?

Anonymous
Not applicable

Been on vacation would have responded sooner. Thanks for your efforts. I retried and I was also successful. I have no idea why it gave me push back but now I'm able to move on. Again, thank you very much for your time. Well apprciated.

 

v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

It doesn't look like an error which is in power query, I could merge tables properly. What did you do to cause this error?

2-1.PNG

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Anonymous
Not applicable

 

here the results of the merge I suggested. seems what you expect

except for the issue 200 that you have in the output is not present in the input tables 

 

image.png

 

 

PS

perahpas you use a old version of PBI?

Anonymous
Not applicable

image.png

camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

The merge function in Power Query doesnt work ? It will replicate the repeated values, like you said.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

Ricardo,

 

I can't directly join. It's a many to many relationship.

 

"I can't get table 1 to join with table 2 on Project. It says I can't join m & m."

 

Thanks!

Steven

@Anonymous ,

 

If you are using Power Query, you don't get this error, it will replicate with n number of duplicated rows.

 

Can you post a print how you are getting this error ?



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Kudoed Authors