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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
newpbiuser01
Helper V
Helper V

Merging and Appending Data Tables

Hello,

 

I am trying to merge and append data from two tables where the first one has an employee name, ID and their travel to and from information. The second table has the employee location - city and country. This location has no bearing on the  To and From country data. 

Travel Data:

NameIDDepartmentToFrom
Bob1SalesCAUS
Bob1SalesUS 
Andy2MarketingCAUK

 

Employee Location:

Name CityCountry
Bob1LondonUnited Kingdom
Bob1BrisbaneAustralia
Bob1New DelhiIndia
Bob1BerlinGermany
Andy2BostonUnited States
Andy2ParisFrance

 

The resulting table should merge the Travel and the Employee location data and Travel Data and if needed add rows for each employee as needed:

NameIDDepartmentToFromCityCountry
Bob1SalesCAUSLondonUnited Kingdom
Bob1SalesUS BrisbaneAustralia
Bob1Sales  New DelhiIndia
Bob1Sales  BerlinGermany
Andy2MarketingCAUKBostonUnited States
Andy2Marketing  ParisFrance

 

I am able to merge the data, but I can't add the new rows where the country to and from fields remain blank for the newly added rows. Would anyone know how I could do this?

 

Thank you for your help!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@newpbiuser01 , Add nested index in both tables as suggested by Curbal - https://www.youtube.com/watch?v=7CqXdSEN2k4

 

Then Merge, in the merge. Select two column with CTRL select first ID and then Index in both tables and do left join with first table

 


merge: 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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@newpbiuser01 , Add nested index in both tables as suggested by Curbal - https://www.youtube.com/watch?v=7CqXdSEN2k4

 

Then Merge, in the merge. Select two column with CTRL select first ID and then Index in both tables and do left join with first table

 


merge: 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

Thanks @amitchandak that worked like a charm! 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.