Hello,
I have data like this:
ID | Year | Value1 | Value2 |
1 | 2016 | 12 | 16 |
2 | 2017 | 32 | 84 |
3 | 2016 | 43 | 36 |
4 | 2016 | 35 | 2 |
I'm trying to make scheduled workflow that creates a wide table from this data dynamically. The result should look like this:
ID | Value1_2016 | Value1_2017 | Value2_2016 | Value2_2017 |
1 | 12 | 16 | ||
2 | 32 | 84 | ||
3 | 43 | 36 | ||
4 | 35 | 2 |
In future the year column will get new values, so when this happens the workflow should automatically create new columns "Value1_2018" and "Value2_2018".
I'm pretty lost where to start. Is this possible in Alteryx and how?
Solved! Go to Solution.
Hi @MarkoT,
Thank you for posting.
So, looking at your data set, I would say that you need to
- reshape your data so you could easily access "Year" and "Name" for each "Value" [Transpose tool]
- based on previous, generate new headers that will look like a string made of "Name", "_" and "Year" [Formula tool]
- reformat the data to use the newly computed header [Cross Tab tool]
As an example:
Hope this helps!
Thanks,
Paul Noirel
Customer Support Engineer, Alteryx
Thank you Paul, that is exactly what I was looking for!