Restructuring a data set

#1
Hello,

I am having trouble transposing an excel (SPSS) dataset. I got the dataset in the form shown below and I need to transform it into a workable form (like it is shown in the lower part of the picture). It is a very large dataset (cca 1500 participants). I tried to do "restructure" - cases intro variables but SPSS says "The INDEX values for case ## have occurred before in the cases with the same ID values. This command is not executed". I think maybe because certain participants have filled in some questionnaires more than once but I am not sure.. I am not great at SPSS or excel and it would be amazing if someone was able to help me here! diplomka_forum.png
 

Dason

Ambassador to the humans
#2
I don't know enough about SPSS to diagnose that error. But it should be easy enough to check if you have duplicate id*questionnaire*question combinations within excel.

It's *very* easy to find duplicates within a single column but if you want to take multiple rows into account you can go about it in a few ways. One could create a pivot table to count the number of responses you have for each id*questionnaire*question combination. Then copy that somewhere and filter it to show which have more than 1 response.

Alternatively you could add a "key" column which pastes the id, questionnaire, and question together and then use conditional formatting to highlight the duplicates. Then you could also then add a filter and use a color filter to only display the duplicates.