Forum Discussion
Removing data with the same values in a specific column between 2 different queries
- 3 years ago
Anonymous,
I would use an anti join in Power Query. Exclude the duplicate rows in TableB, and then append the remaining rows to TableA.
1. Create a left anti join:
2. Remove column "TableA" and name this table TableBAntiJoin:
3. Append TableA to TableBAntiJoin:
4. Result:
Anonymous,
I would use an anti join in Power Query. Exclude the duplicate rows in TableB, and then append the remaining rows to TableA.
1. Create a left anti join:
2. Remove column "TableA" and name this table TableBAntiJoin:
3. Append TableA to TableBAntiJoin:
4. Result:
- Anonymous3 years agoNot applicable
Thanks for the help. Though I am confused. I have followed your solution but I got the error "A cyclic reference was encountered" when appending.
Also, I don't think I understand your solution. You have name1 - 4 in the final table but isn't this effectively combining the tables into one table, leaving no duplicates. Using your example, the final result should be Table B: name4 (removed name1) and TableA: name1, name2, name3. Am I understanding correctly?
- DataInsights3 years agoSuper User
Anonymous,
The cyclic reference can be avoided by using "Merge Queries as New". This creates a new query.
If the requirement is to have two tables, each with unique names, then you can skip the append step. TableA would have Name1-3 and TableBAntiJoin would have Name4.