Merge Two Datasets into one
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
Solved! Go to Solution.
- Labels:
- Datasets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Attached are two example data sets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks @RCern,
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:
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.
I hope this helps!
Thanks,
Wes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
