Im currently designing my survey and I have a grid question where respondents need to select how much they agree/disagree to 5 statements (1-strongly disagree, 5-strongly agree). I want to calculate a numeric variable that computes the average value for each respondent since I want to include this continuous variable as covariate later in my analysis.
I searched in the forum and I found a possible way to calculate such variable by creating a new variable within a Free Format question, and make it a "hidden" type variable. Then in the html box add [% (Q1 + Q2 + Q3 + Q4 + Q5)/5 %] this script. I followed these instructions but instead of having different questions within the brackets I had the different rows as followed:
[% (IndScale_r1 + IndScale_r2 + IndScale_r3 + IndScale_r4 + IndScale_r5) /5 %]
The problem is that this doesnt seem to work because when I filled in a questionnaire and downloaded the data the column refers to the new variable is empty. So no value was calculated. In addition, when I filled in the survey I noticed that in the place where the new variable was added a "0" appeared. That is kind of weird since I clicked at the "hidden" format.
Am I doing something wrong? Is there another way to calculate the average value per respondent for a grid?
Thank you :)