Alteryx Designer Desktop Discussions

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

Transposing variable number columns to rows

amw1
7 - Meteor

I need to convert multiple excel files into a format that can be loaded into a database table. The files are answers to survey questions about software applications. The first question the user answers is what applications will they be rating. Then each question will have a column for the applications chosen that holds the rating. There is also a free form column that is used for each question. The number of applications can vary. For instance there could be 10 total and during the survey only 3 were chosen by the participants. Another survey might have 6 applications chosen.

 

For example there are 4 people taking the survey and their results look like:

 

Person IDOfficeSkypeDuoQuestion1OfficeSkypeDuoQuestion2OfficeSkypeDuoQuestion3OfficeSkypeDuoQuestion3
1Office Duo 2 2 1 2 1 4everything works
2 SkypeDuo  34  32  N/A3 
3OfficeSkypeDuo 253this is great143 444 
4Office   4   3   4   

 

I would like the data to be converted to:

 

IDNameValueQuestion
1Office2 
1Duo2 
1Office1 
1Duo2 
1Office1everything works
1Duo4everything works
2Skype3 
2Duo4 
2Skype3 
2Duo2 
2SkypeN/A 
2Duo3 
3Office2 
3Skype5 
3Duo3 
3Office1this is great
3Skype4this is great
3Duo3this is great
3Office4 
3Skype4 
3Duo4 
4Office4 
4Office3 
4Office4 

 

 

If I start with the transpose tool I can get part of the way but I am unsure of the best way to add a column for the free form entry for only the rows for that particular question.

 

I appreciate your help and suggestions and have attached a sample excel spreadsheet as well.

 

 

3 REPLIES 3
JoBen
11 - Bolide

Hi @amw1, here is a workflow that should be able to display the data the way you need it. Here is the outcome that I came up with. 

Help1.PNG

amw1
7 - Meteor

Hi JoBen,

 

Thank you so much for the solution! I'm trying it out with actual data that has the variable applications but I think it should work fine.

 

Thanks again!

JoBen
11 - Bolide

Okay. You bet!

Labels