Alteryx Designer Desktop Discussions

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

Rows converting to cols (customer transpose)

Alteryx_user_aK
8 - Asteroid

Hi,

 

I have a custom requirement to transpose the data. here is sample data

 

PrimKey   TransposeKey  C1    C2      C3     C4

111            BBB                  X    10        ER     33

111            BBB                  Y     30       PK      35

111            CCC                  Z     12      RT      24

 

I need output as 

 

PirmKey   TransposeKey C1    C2      C3     C4   TranposeKey1   C11    C21      C31     C41   TransposeKey2 C12    C22     C32     C42  

111           BBB                  X    10        ER     33      BBB                  Y     30           PK      35               CCC                  Z     12      RT      24

 

Please let me know which tool (set of) can be useful fixing this issue.

 

Thanks in advance

AK

8 REPLIES 8
martinding
13 - Pulsar

Hi @Alteryx_user_aK,

 

Here is one way to do it:

martinding_0-1681294778727.png

 

 

binuacs
20 - Arcturus

@Alteryx_user_aK One way of doing this

binuacs_0-1681295431550.png

 

 

martinding
13 - Pulsar

@binuacs Nice use of the Formula + Dynamic Rename tool!

Raj
14 - Magnetar

had a try , you can use the logic 

might help

Raj
14 - Magnetar

@martinding @binuacs  great logic !!

Christina_H
14 - Magnetar

Here's another option

Christina_H_0-1681297917985.png

Alteryx_user_aK
8 - Asteroid

 Hi all

 

I appreciated your quick support. I tried all solutions, all are working as expected. I am going with solution provided by Christina_H 

 

 

Thanks and Regards

aK

Alteryx_user_aK
8 - Asteroid

Hello martinding,

 

When I tried using your solution I faced one issue.

 

when PrimKey changes, it does not come to next line. All primKey comes on same line.

 

ideally, new PrimKey should be on new line (next record)

111 .....

222 .....

444...

333 ...

 

Is there any quick fix in your solution for this requirement ?

 

Thanks in Advance

 

aK

 

 

Labels