Alteryx Designer Desktop Discussions

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

Convert one column to multiple columns based on column values

mpn
5 - Atom

I have:

 

FIPSStateAreaNameValueYear
111Aval11
112Bval22
113Cval33
224Dval42
221Aval53
222Bval64
333Cval71
334Dval82
335Aval99

  

And I would like to get here:

 

FIPSStateAreaABCDYear
111Val1Val2Val3Val41
112Val5Val6Val7Val82
        

 

 

Any help appreciated... Nothing in previous posts like this.

3 REPLIES 3
Claje
14 - Magnetar

Hi,

The data sample you have here doesn't seem to exactly translate to what you're looking for, so i'm assuming you have more data with a value like 

FIPSStateAreaNameValueYear
111Bval21

 

If that data doesn't exist, i'm hoping you can give me some more information.


The Cross-Tab tool should accomplish what you want.


If you Group By the fields FIPS, State, Area, and Year, then your Column Name can be "Name" and Value can be "Value".

Based on the sample dataset, you would then get an output something like this:

FIPSStateAreaYearABCD
1111val1   
1122 val2  
1133  val3 
2213val5   
2224 val6  
2242   val4
3331  val7 
3342   val8
3359val9   
mpn
5 - Atom

Thank you so much! I selected First as Method and it looks OK (there seem to be no empty cells)!

Claje
14 - Magnetar

Awesome! Glad I could help!

If you don't trust your data, you can leverage the Concatenate option and do some nifty things like counting your delimiter character in order to prove out that you never "double up" in your source.

Labels