Power Query, Merge, One-to-One, full outer join. Results are one-to-many join

AnneMarie94

New Member
Joined
Oct 13, 2020
Messages
5
Office Version
  1. 2016
Thanks for your help. In a single workbook, I have two tables (on separate worksheets) each as the same 14 columns. table 1 has 1276 rows, table 2 has 989 rows. I have connections to each table in the workbook queries list. I merged the queries with table 1 first then table 2. I selected the year columns first and then the country columns next. The merge editor said that 1274 rows matched for both columns. I asked for a full outer join and clicked Okay. Then in the Query Editor I expanded the rows for table 2. I selected all but one column which I knew had no data in it.

I could see in the Query Editor that this had not performed a one-to-one join. Instead it did a one-to-many join. Not only is this not what I wanted. But, it increased the size if the table exponentially. How can I get a one-to-one join. I'm pretty sure that I used this exact method two weeks ago to successfully join two other tables.
 

Attachments

  • merge_problem_1.png
    merge_problem_1.png
    52.9 KB · Views: 59

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I could see in the Query Editor that this had not performed a one-to-one join. Instead it did a one-to-many join. Not only is this not what I wanted. But, it increased the size if the table exponentially. How can I get a one-to-one join. I'm pretty sure that I used this exact method two weeks ago to successfully join two other tables.
add tables to Data Model then join them as you wish (if it will be possible), I really don't know what you did two weeks ago :unsure:
 
Upvote 0
Thank you for your references. I will follow up with them. I'm not familiar with Power BI right now but will try working with it. Is there no way to do a one-to-one join or merge in Power Query or regular Excel? I have a lot more experience with those. I think that this dataset would be too large for VLOOKUP but I'm not sure.
 
Upvote 0
it works with Power Query and Power Pivot (Data Model) in Excel 2016, you don't need to use PBI
 
Upvote 0
Two weeks ago, all three tables had the same number of rows that matched each other for both the year and country columns.

Thanks for the tip. I have put my tables into a data model. Unfortunately, Power Pivot won't let me create relationships between the year or country columns because each cell doesn't have unique data in it. The rows are unique because of the combination of the year and country data put together. Would you suggest that I create a new column in each table with a combo of the year and country as an identifier for each row? Then bring the tables into the data model? Is there a better way to do this?

Thank you for your help.
 
Upvote 0
you can do that in Data Model, just new column with concatenated data from Year and Country columns, the same for both tables
 
Upvote 0

Forum statistics

Threads
1,223,630
Messages
6,173,454
Members
452,514
Latest member
cjkelly15

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