Partially Transpose a Table with Unpivot

Unpivot allows you to convert column values into rows.

In this example, we have survey information where each respondent and all his questions and answers are on one row. We want to get each question and answer for each respondent on a single row - resulting in multiple rows per respondent.

First we go to Transform Data and unpivot the answer columns - each respondent will then have as many lines as there were questions and answers. To relate the questions to the answers, create a calculated field with a nested IF statement on the attribute and question columns. Lastly, clean up the extra columns that are no longer needed, retaining the final question and answer columns for each respondent.