Alteryx Designer Desktop Discussions

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

Merge Two Datasets into one

recoilx
8 - Asteroid

I have a monthly report where I combine two separate reports into one, basically taking one report and appending the data to the appropriate column in the other report.   I was able to successfully create two separate workflows representing the two reports and am now trying to append the data from one workflow output INTO the appropriate column of the other dataset workflow.   I can't seem to achieve this via the Append or Join tools.  Is this functionality not possible in Alteryx?

7 REPLIES 7
WesCannon
Alteryx
Alteryx

Hi @recoilx ,

 

Can you provide an example or sample dataset so we can troubleshoot?

 

Thanks,

Wes

recoilx
8 - Asteroid

Attached are two example data sets

WesCannon
Alteryx
Alteryx

Thanks @recoilx,

 

Looking at your sample data, the first thing I notice is that there are no unique identifiers that are in each data set to join on. If you are trying to join the data horizontally you can utilize the 'Join Tool' and the 'Join by Record Position' function to join your data as seen below:

 

WesCannon_0-1678285739061.png

 

If you need to stack your data on top of each other, you can utilize the 'Union Tool' as seen below. You will need to ensure that the header names are the same to use the 'Auto Config by Name' option, otherwise you'll need to 'Auto Config by Position' or manually configure the union.

 

WesCannon_1-1678285884423.png

 

 

I hope this helps!

 

Thanks,

Wes

recoilx
8 - Asteroid

Correct, both data sets have unique data, no common customer # to match on so it seems I have to use the Union tool.   Just to make sure I understand, I make sure the column names match exactly, correct?   What happens if the second data set doesn't have all of the columns in the 1st data set?  Do I need to create empty placeholder columns in the second data set?

WesCannon
Alteryx
Alteryx

It will automatically create new columns if the names do not match, as you can see with the Date2 and Date 2 columns in the example above. Here is some additional info on the Union Tool.

 

https://help.alteryx.com/20223/designer/union-tool

 

I would also recommend clicking on the Union Tool -> Open Example to view the one tool example.

 

Thanks,


Wes 

recoilx
8 - Asteroid

Thank you!!!

rachelgomez
7 - Meteor

To join two data frames (datasets) vertically, use the rbind function. The two data frames must have the same variables, but they do not have to be in the same order. If data frameA has variables that data frameB does not, then either: Delete the extra variables in data frameA or.

 

Regards,

Rachel Gomez

Labels