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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Unable to merge tables in power query

I really want to merge two tables. The first table is sample contact_list, the second table is reminder list_to do. These two lists are similar in some columns: they both have ID column, code number, name used by supplier, supplier for purchase, manufacturer, and email address 1. The sample contact_list is full but the reminder_list to do has fewer items. However, I want to compare these two lists and add on those new added differences in sample contact_list to the reminder list_to do. I used the ID column they both have as a primary key. However achieve this goal?

 

I've tried the method to "merge query" and use "Full Outer", but the problem is that they are not matched in columns. The first several columns are from sample_contact list with null information from reminder_list to do, and remaining later coluumns are from reminder_list to do, but the cells for sample_contact list are empty. How to solve this issue. I used my graph below to help you understand what do i mean. 

 

screenshot.png

Can someone help me? Thank you so much again. 

3 REPLIES 3
dufoq3
Super User
Super User

Hi, could you provide dummy data from both tables?

 

let
    SourceTableA = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXJUitWJVjICsSBMYzATwjaBsCEcUygHyIsFAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, #"Data A" = _t]),
    SourceTableB = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXJSitWJVjICssAMY5CQE0TQBCZoChEECccCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, #"Data B" = _t]),
    #"Merged Queries" = Table.NestedJoin(SourceTableB, {"ID"}, SourceTableA, {"ID"}, "SourceTableA", JoinKind.LeftOuter),
    #"Expanded SourceTableA" = Table.ExpandTableColumn(#"Merged Queries", "SourceTableA", {"Data A"}, {"Data A"})
in
    #"Expanded SourceTableA"

Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Anonymous
Not applicable

 150550086

Product 1

x1

company 11st personjjj@abcd.com
 250575853

Product 2

x2

company 22nd personaaa@abc.com
 350575853product 3company 3 3rd personbbb@abc.com
 450549642ACETIC ACID GLACIALcompany 44th personccc@abc.com
 550576163ACETONEcompany 55th personddd@abc.com
 650576163ACETONEcompany 6 6th personeee@abc.com

This is the first table i need to use, the heading for each column is index number, code number, product name, company name, owner name and email address. The second table is similar to this table, it's just they are different index number, so like this

 950576163product 9company 99th person acd@abcd.com
 1050576163product 10company 1010th person efg@abcd.com
 1150576163product 11company 11 11th persondqm@abcd.com

Sometimes maybe the second table has some specific rows same as the same table, i just want to keep the value in the first table, and not add those duplicates one into the table using Merge. 

You can do merge i.e. with [Code Number] columns. 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.