Alteryx Designer Desktop Discussions

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

Transform Survey responses with multiple answers on multiple choice

willd9
7 - Meteor

I have survey response data, below is a sample:

 

IDWhich of the following Supermarkets are you aware of? (Please select all that apply)Which of the following Supermarkets do you shop at? (Please select all that apply)
123Asda, LidlAsda, Lidl
124Asda, Tesco, LidlTesco, Lidl
125Aldi, Asda, Tesco, LidlAldi, Asda, Tesco
126Aldi, Tesco, Lidl, SainsburysAldi, Tesco, Lidl, Sainsburys
127Aldi, Asda, Tesco, Lidl, SainsburysSainsburys

 

In order to analyse the responses, I want to create a column for each of the possible answers (Aldi, Asda, Tesco, Lidl, Sainsburys) and mark wherever the responder has selected them. The below would be an example of the output I want to see:

 

IDQuestionAldiAsdaTescoLidlSainsburys
123Which of the following Supermarkets are you aware of? (Please select all that apply)01010
123Which of the following Supermarkets do you shop at? (Please select all that apply)01010
124Which of the following Supermarkets are you aware of? (Please select all that apply)00110
124Which of the following Supermarkets do you shop at? (Please select all that apply)11110
125Which of the following Supermarkets are you aware of? (Please select all that apply)11110
125Which of the following Supermarkets do you shop at? (Please select all that apply)11100
126Which of the following Supermarkets are you aware of? (Please select all that apply)10111
126Which of the following Supermarkets do you shop at? (Please select all that apply)10111
127Which of the following Supermarkets are you aware of? (Please select all that apply)11111
127Which of the following Supermarkets do you shop at? (Please select all that apply)00001

 

I'm assuming there'll be a Cross Tab tool used at some point, but I'm a bit of a novice when it comes to that tool. Any ideas?

2 REPLIES 2
DataNath
17 - Castor

Hey @willd9 here's one way you could go about it. Here we:

 

1) Transpose the data, grouping by each ID

2) Split the comma separated entries so we get a row for each

3) Use a dummy 1 so we can perform counts

4) Cross-Tab back, grouping by ID and question, using the supermarket names as headers and then doing a sum of our 1s

5) Select/Multi-Field Formula are just for some general clean up of header names and results

 

Hope this helps, please do shout if you have any questions!

 

2015.png

ChrisTX
15 - Aurora

Try the attached workflow.

 

Screenshot 2023-10-16 110345.png

 

Chris

Labels