Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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:
Name | ID | Department | To | From |
Bob | 1 | Sales | CA | US |
Bob | 1 | Sales | US | |
Andy | 2 | Marketing | CA | UK |
Employee Location:
Name | City | Country | |
Bob | 1 | London | United Kingdom |
Bob | 1 | Brisbane | Australia |
Bob | 1 | New Delhi | India |
Bob | 1 | Berlin | Germany |
Andy | 2 | Boston | United States |
Andy | 2 | Paris | France |
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:
Name | ID | Department | To | From | City | Country |
Bob | 1 | Sales | CA | US | London | United Kingdom |
Bob | 1 | Sales | US | Brisbane | Australia | |
Bob | 1 | Sales | New Delhi | India | ||
Bob | 1 | Sales | Berlin | Germany | ||
Andy | 2 | Marketing | CA | UK | Boston | United States |
Andy | 2 | Marketing | Paris | France |
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!
Solved! Go to Solution.
@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
@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
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
71 | |
70 | |
38 | |
28 | |
26 |
User | Count |
---|---|
97 | |
88 | |
60 | |
43 | |
40 |