Hello everybody,
i have the following table, which includes different dimension types and corresponding dimension data:
Dim_Type | Dim_Index |
1 | 1 |
1 | 2 |
2 | 1 |
2 | 2 |
2 | 3 |
Based on this i need to create the following table, which has Dim_Types as header and includes all combinations of the Dim_Index in the rows:
Dim_Type_1 | Dim_Type_2 |
1 | 1 |
1 | 2 |
1 | 3 |
2 | 1 |
2 | 2 |
2 | 3 |
Currently i am achieving this by using multiple filter and append field tools. But as the solution has to work for different datasets with different dimension types, i would like to do it dynamically so it automatically works for more dimension types.
Is there a "smarter" way to dynamically append the fields to generate this table?
Thanks!
Solved! Go to Solution.
Hey @manjuul
There are going to be many ways to solve this problem but this is one way. I didn't handle your header names but the unique values will scale to however many you have.
Hope this helps!
Hi Joshua,
thanks for your fast reply. Unfortunately its not quite what i'm trying to achieve, as it does not generate new columns for each "Dim_Type". I'm looking for something that works like the workflow i attached, but for a dynamic count of Dim_Type and Dim_Index.
Is it possible to achieve something like this?
Best Regards
Hey @manjuul
I don't think this is possible in pure Alteryx. Happy to be wrong. See my Python based solution attached,
Hi Philip,
indeed this seems to work. Maybe its time to get more into Python.
Thanks!
Hi everyone,
I used @PhilipMannering 's Python solution for an issue I was having, thank you very much!
Nick