Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Unpivoting crosstab data into a flat table

Hi dear all, I have some problems about unpivoting crossable data into a flat table. I have a table listed like below, and I would like to unpivoting columns from Q1_1, Q1_2, Q1_3,..Q1_6, Q2, Q3,Q4 into a flat table. As we can see, columns from Q1_1 to Q1_5 are numeric, and Q2,Q3,Q4 are text. I would like to use the first set question's value to calculate mean, max, min, and count, meanwhile 'Client', 'Date','Event', 'respondent', can be the selection option. I now know how to approach this step. But I have been stuck at next step: For Q2, Q3, Q4, I only need the table just display the value, by selecting  'Client', 'Date','Event', 'respondent', 'Question number'. Can I unpivoting Q2-Q4 with Q1 at the same time? If not, is there any suggestions I can follow? Many thanks to you all!!

Data sample was attached.

0 Replies