Alteryx Designer Desktop Discussions

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

Dynamic Append based on Column

manjuul
5 - Atom

Hello everybody, 

 

i have the following table, which includes different dimension types and corresponding dimension data:

Dim_TypeDim_Index
11
12
21
22
23

 

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_1Dim_Type_2
11
12
13
21
22
23

 

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!

 

5 REPLIES 5
joshuaburkhow
ACE Emeritus
ACE Emeritus

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! 

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
manjuul
5 - Atom

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

 

 

PhilipMannering
16 - Nebula
16 - Nebula

Hey @manjuul 

 

I don't think this is possible in pure Alteryx. Happy to be wrong. See my Python based solution attached,

 

PhilipMannering_0-1605876392302.png

 

 

 

manjuul
5 - Atom

Hi Philip,

 

indeed this seems to work. Maybe its time to get more into Python. 

 

Thanks!

Nicholas_White
8 - Asteroid

Hi everyone,

 

I used @PhilipMannering 's Python solution for an issue I was having, thank you very much!

 

Nick

Labels