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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
leightx
Frequent Visitor

How to add values that aren't in one table to another in different column

I'm trying to compare Table 1 and Table 2 and add Table 2 SKU items that are not found in SKU 1 to the bottom of SKU 2. I tried doing a left anti join (using table 2 as left table) to get the unique Table 2 SKUs, but I can't append them to the SKU2 column in table 1 b/c there is a circular reference. I tried using reference tables for both Table 1 and 2, and still ran into the same problem. 

 

 

mergeappend.JPG

2 REPLIES 2
kentyler
Solution Sage
Solution Sage

I believe the usual pattern is to make 2 temp tables. Extract distinct values from sku 1 into one of them and distinct values from sku 2 into the other. Then make a 3rd table using a union query to combine those 2. You make have to wrap the union statement in another distinct to eliminate duplicate values.





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Just to clarify, I can't have only distinct values in SKU2 in the desired output. 

 

Basically, I want to compare SKU1 (from table 1) and SKU (from table 2) and get the items from SKU (table 2) that are not in SKU1 (table 1). Then I want to append those into the SKU2 column in table 1. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors