Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

"Unpivot" Data transformation.

D12monkey
8 - Asteroid

I must be having a bad day. I can't for the life of me remember how to do a data transformation/Unpivot in alteryx.

 

I have data that comes in the follow format.

 

Field1Field2Field3Field4
1(null)(null)(null)
(null)2(null)(null)
(null)(null)3(null)
(null)(null)(null)4
a(null)(null)(null)
(null)b(null)(null)
(null)(null)c(null)
(null)(null)(null)d

 

and I need it in this format.

 

Field1Field2Field3Field4
1234
abcd

 

I can remember how to do it with a multirow formula, but I have 50 some-odd columns and don't want to add 50+ multi formula tools.

 

And help would be appreciated.

 

Thanks!

3 REPLIES 3
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @D12monkey,

 

I think this is what you're trying to achieve?

 

Jonathan-Sherman_0-1589829681425.png

 

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

grossal
15 - Aurora
15 - Aurora

Hi @D12monkey,

 

don't worry, we got your back! And here is how to do it:

 

grossal_0-1589829675980.png

 

What happens:

- Transpose everything into Rows

- Filter out all null values

- Add a custom Counter grouped by your Field Name values (Multi-Row-Formula)

- Cross Tab everything back

- Remove the "Counter" Column (Select)

 

Sample Workflow attached. Let me know if this solved your problem.

 

Best

Alex

D12monkey
8 - Asteroid

Thanks!

Labels