Forum Discussion
ssbagley
3 years agoHelper III
Merge or Append with Null Values
I have two tables and I need to combine them, but I've tried both Merge and Append, both with issues. Append gets me closest to what I need.
When I append Table 1 and Table 2 (very simplified example), I get all the rows and columns from both tables, but Null values where the tables do not have the same columns - basically duplicated rows where data is populated from one report or the other. How can I fix it?
Table 1
| Name | Emp ID | Date | Amount | Comment |
John | 222 | 04/27/2023 | 5 | text text |
| John | 222 | 04/21/2023 | 10 | |
| Susan | 225 | 04/15/2023 | 17 | |
| Susan | 225 | 04/17/2023 | 22 | Text |
Table 2
| Name | Emp ID | Date | Location | Amount |
John | 222 | 04/27/2023 | Dallas | 5 |
| John | 222 | 04/21/2023 | Houston | 10 |
| Susan | 225 | 04/15/2023 | Houston | 17 |
| Susan | 225 | 04/17/2023 | Austin | 22 |
Desired output:
| Name | Emp ID | Date | Location | Amount | Comment |
John | 222 | 04/27/2023 | Dallas | 5 | text text |
| John | 222 | 04/21/2023 | Houston | 10 | |
| Susan | 225 | 04/15/2023 | Houston | 17 | |
| Susan | 225 | 04/17/2023 | Austin | 22 | Text |
1 Reply
- vicky_Super User
Change the join type - look here for more info - https://radacad.com/choose-the-right-merge-join-type-in-power-bi