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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors