Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How would you combine 2 sheets based on 1 field, but combine certain columns not append?

dsucci
6 - Meteoroid

So i'm trying to combine 2 excel sheets and i'm looking for something similar to index/matching in excel, where say i have 2 tables:

Table 1:

IDNameCodeCountry
1Jane Green Canada
2John Blue  

 

Table2:

IDNameCodeFruitCountry
1Jane Green5NJAppleCanada
2John Blue3FCPearUSA

 

So How would i get them to match based on ID but then insert the "code" into table 1 and add in the fruit column while also adding in missing data from Country? In this example, I know they are the same size so i could just keep Table 2, but in my predicament table 1 is significantly bigger and the "master" data, so i'm trying to add in this new information of table2 into table 1. When i use a Join tool it will match based on ID but then just append the "code" onto the end by calling it "Right_code"

2 REPLIES 2
Raj
16 - Nebula

@dsucci 
please find the workflow attached

if this is not the required output
please add the expected output.

mark done if solved.

ChrisTX
16 - Nebula
16 - Nebula

Let the Join tool add the extra column "Right_Code"

 

Then use a Formula tool with this expression, to update the field [Code] you want to keep:

 

IF IsEmpty([Code]) THEN [Right_Code] ELSE [Code] ENDIF

 

Guessing it's not possible to have a value for Code from both Sheets?

 

Chris

Labels
Top Solution Authors