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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

How to merge two tables based on 2 similar columns

Hello,

I have the following two tables and i am trying to merge them into a single table by keeping the first 2 common columns and then appending all the other columns. Is this possible? Any help is much appreciated!

 

First Table

YearWeek numberItemsReturnsDefective
20221348
202226917
202232510
202249316
202255615
202262210
202277822
202283313
202296318
2022103314
2022112717
2022123722

 

Second Table

YearWeek numberSoldExcessExpired
202212811
202226210
202233612
202243512
202257315
202262311
202279319
202284713
202297218
2022108914
2022115217
2022123621

 

Results:

YearWeek numberItemsReturnsDefectiveSoldExcessExpired
202213482811
2022269176210
2022325103612
2022493163512
2022556157315
2022622102311
2022778229319
2022833134713
2022963187218
20221033148914
20221127175217
20221237223621
1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

Looks like a merge on a Year and Week Number (inner join) but are you wanting something else to happen to the Expired column?

View solution in original post

2 REPLIES 2
HotChilli
Super User
Super User

Looks like a merge on a Year and Week Number (inner join) but are you wanting something else to happen to the Expired column?

Anonymous
Not applicable

@HotChilli Thanks for your reply! Sorry, there was an error with the Expired column. I used inner join successfully! Inner join - Power Query | Microsoft Docs

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors