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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anil2264
Helper I
Helper I

Merge 2 Tables

Hi,

 

Can you please help me out to have below output in power query which joins I need to make? Please help

 

All data columns are existing in 3 source files then I wanted to output as below.

 

Anil2264_0-1645534792037.png

@amitchandak 

Thanks

Anil Pal

7 REPLIES 7
AlexisOlson
Super User
Super User

For each new data column, remove the values in the columns to the left and then combine them.

 

Full sample query you can paste into the Advanced Editor of a new blank query:

let
    DATA1 = #table(type table [DATA1 = text], {{"A"},{"B"},{"C"},{"D"},{"E"},{"F"},{"G"}}),
    DATA2 = #table(type table [DATA2 = text], {{"A"},{"D"},{"G"},{"J"},{"H"},{"I"}}),
    DATA3 = #table(type table [DATA3 = text], {{"B"},{"J"},{"L"},{"K"},{"M"},{"N"}}),
    List1 = DATA1[DATA1],
    List2 = DATA2[DATA2],
    List12 = List.Distinct(List.Combine({List1, List2})),
    Table1 = DATA1,
    Table2 = Table.SelectRows(DATA2, each not List.Contains(List1,  [DATA2])),
    Table3 = Table.SelectRows(DATA3, each not List.Contains(List12, [DATA3])),
    Source = Table.Combine({Table1, Table2, Table3})
in
    Source

(If you have DATA1, DATA2, DATA3 defined as separate queries, remove those definitions from the query above.)

Thanks Alex for your response but in my actual records i have multiple columns & in single columns almsot having 1Lac rows 

then how can we achieve it.

Please help me

I don't understand "almsot having 1Lac rows". Can you give an example that is more like your actual data?

Anonymous
Not applicable

Oh ok. That is JoinKind.Right.Anti

 

--Nate

Anil2264
Helper I
Helper I

Hi,
But Full outer join will print both tables record right, I only wanted to see the non-existing item of my first table into my merging table

@Anil2264 , I think append, keep the column names different

 

Append : https://radacad.com/append-vs-merge-in-power-bi-and-power-query

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Full Outer Joins. 

--Nate

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.