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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors