Dear all
I have two datasets that I would like to union
The first contains of a company ID and founding year numbers:
Company ID | Founding Year |
1 | 1990 |
2 | 1991 |
3 | 1992 |
4 | 1993 |
5 | 1994 |
The second one contains the company ID a year and the respective number of emmployees
Company ID | Year | Number employees |
1 | 2015 | 3 |
1 | 2016 | 4 |
1 | 2017 | 5 |
1 | 2018 | 6 |
1 | 2019 | 7 |
3 | 2015 | 25 |
3 | 2016 | 26 |
3 | 2017 | 27 |
3 | 2018 | 28 |
3 | 2019 | 29 |
What would I need to do in Alteryx to receive the following merged output of the two datasets?
Company ID | Founding Year | Year | Number employees |
1 | 1990 | 2015 | 3 |
1 | 1990 | 2016 | 4 |
1 | 1990 | 2017 | 5 |
1 | 1990 | 2018 | 6 |
1 | 1990 | 2019 | 7 |
2 | 1991 | ||
3 | 1992 | 2015 | 25 |
3 | 1992 | 2016 | 26 |
3 | 1992 | 2017 | 27 |
3 | 1992 | 2018 | 28 |
3 | 1992 | 2019 | 29 |
4 | 1993 | ||
5 | 1994 |
Thank you so much!!!
Hi @timol ,
What you have to do here is first join your data on Company ID and then use a Union tool.
A more advanced way would be to use a Join Multiple tool, that will provide the same output.
Hope that helps,
Angelos
Hi @timol
In this case, you'll actually want to start off with a join tool. Join your two datasets by the Company ID field. From there, use a Union tool to keep the L & J outputs. This should get you the output you're looking for.
Hope this helps!