Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

join/union problem

PabloDanielovich
7 - Meteor

I'm trying to figure out the solution for what I'm sure is a very simple problem but my brain isn't cooperating at the moment. 
I have 2 input files with account numbers and balances.  The first one is the Master file, the second one is from a different source.  I want to match up the accounts using the following logic:
1)Everything in the Master file transfers over to the final output
2)Rows that are in TestInputB and match to rows in Master (by account number) get added to final output, but the Balance amount from TestInputB is moved to Balance2 column
3)Rows that are in TestInputB but don't exist in the Master, are added to the output and Balance is mapped to Balance2

problem.png

So far I've got it to where the original records and the unmatched records get added to the output, but I'm a bit stumped on how to get the matching records and move the balance over to column 2.  Do I need to do another union? or am I overcomplicated a simple problem?

solutionWIP.png

1 REPLY 1
Joe_Mako
12 - Quasar

Seems like just a Select tool to rename the field from InputB and then a Union would get that output, for example:

 

testworkflow.png

 

Do you need an identifier field added so you know where it matched? If so, then maybe something like will work:

 

testworkflow v2.png

Labels
Top Solution Authors