Powery Query - Is it possiblee to merge with duplicates?

gimmeexcel

Board Regular
Joined
May 8, 2009
Messages
95
[h=2][/h]
Hello everybody,

I'm just trying to get clarity on this because it seems that the only way to merge using Power Query is with unique values.

So basically I have 2 tables. My main table has a column with cells that contain a few duplicates. The column in the lookup table doesn't have any duplicates. Is there a way to return the same value to each duplicate in in the main table?

Any input would be greatly appreciated.

Thanks!
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Are you doing a table merge? Yes this works fine. Load your table with duplicates as the fist table, the other as the second table. Select left outer join, then expand the new column of data
 
Upvote 0
Thanks so much, Matt. Really nice of you to help and provide a video.

When I try to repeat what you did, I get the same result as you. However when I try it with other data, it doesn't work.

It has to be something wrong with my data set (below). I don't want to take up a lot of your time. But I'm hoping you could just take a quick lot at my tables and tell me what's wrong with my data and why it won't merge.

https://docs.google.com/spreadsheets/d/1bh_zoiDWeIaCtOFXfAesi-vOJocHNzjpuFmtw--eB8I/edit?usp=sharing


 
Upvote 0
A what actually happens? Do you get any joins at all? I haven't tested it, but the first thing I suggest is to trim and clean both columns before joining. This will remove leading and trailing spaces (that you can't see) and also non printing characters. The values must be identical for a join to succeed.

Select one of the columns, then go to Transform\format and apply the trim step, then the clean step. Repeat for the other column in the other query. Then try the join again. I suspect that will fix it. If not, try manually cut and paste the value from one cell in one of the tables to (what seems like) an identical row in the other table. This way you know for sure that these 2 rows ARE identical. Try the join again and see if this one row at least works. This will confirm the problem.
 
Upvote 0
Thanks for following up Matt. And thanks for the great tip.

Out over 1,100 only 30 or so are not matching now. I need to look through to see if the unmatched are just missing in one of the tables.
 
Upvote 0

Forum statistics

Threads
1,216,100
Messages
6,128,824
Members
449,470
Latest member
Subhash Chand

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top