cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MakeItReal
Post Patron
Post Patron

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?

@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
Vote for T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors
Top Kudoed Authors