Alteryx Designer Desktop Discussions

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

How to combine two sets of data with one common column then combine multiple rows

gc-804
7 - Meteor

Hello,

 

I have two sets of large data. Below are simplified examples:

 

File 1:

TypeCodeDescriptionBox 1Box 2Box 3
EarningAAAA112233
EarningBBBB112233
EarningCCCC11 33
DeductionDDDD   
DeductionEEEE   

 

File 2:

DescriptionBox - Other1Box - Other2
CCC40 
DDD 50
EEE 60

 

I want to combine them into below:

TypeCodeDescriptionBox 1Box 2Box 3Box - Other1Box - Other2
EarningAAAA112233  
EarningBBBB112233  
EarningCCCC11 3340 
DeductionDDDD    50
DeductionEEEE    60

 

I uses Joint by Description first and then Summarize by Description, but Box - Other1 and Box - Other1 only returned Null. Should I do it differently?

 

Thanks!

 

 

2 REPLIES 2
CharlieS
17 - Castor
17 - Castor

Hi @gc-804 

 

Since your File 1 has all the records in the correct order that you want your output in, let's take advantage of that by assigning a Record ID for later. Now we can Join the files on the [Description] field, union the joined and un-joined results and sort to the original order with the Record ID. Then we can use a Data Cleansing tool takes care of the empty and null values in our output. At the end of this workflow, you could use a Select tool to remove the {Record ID] field that was added at the beginning, but I left it in there for now as an example. 

 

20200403-JoinParts.PNG

 

Check out the attached workflow for an example of this in action. 

gc-804
7 - Meteor

@CharlieS,

 

It works. Thank you!

Labels