As you see in the screenshot your actual equation takes into account both scales
That is because you only say
that.Q1.sq_R.NAOK.
So
all cells that contain a "R" are calculated.
The first idea is:
Add the index of the scale as described here
[url]
www.limesurvey.org/manual/ExpressionScri...code_variable_naming
[/url] QuestionCode . '_' . SubQuestionID . '_' . ScaleId
To calculate only the first scale it should be:
that.Q1.sq_R_0.NAOK.
and the second:
that.Q1.sq_R_1.NAOK.
BUT this doesn't work.
You can't add something after the part that is expanded ("R"). ExpressionScript doesn't know, what exactly to expand.
So you have to add the variables one by one like
Scale 1:
{sum(sum(Q1_R1_0.NAOK,Q1_R2_0.NAOK,Q1_R3_0.NAOK,Q1_R4_0.NAOK),4*count(Q1_I5_0.NAOK,Q1_I6_0.NAOK,Q1_I7_0.NAOK)-sum(Q1_I5_0.NAOK,Q1_I6_0.NAOK,Q1_I7_0.NAOK))}
Scale 2:
{sum(sum(Q1_R1_1.NAOK,Q1_R2_1.NAOK,Q1_R3_1.NAOK,Q1_R4_1.NAOK),4*count(Q1_I5_1.NAOK,Q1_I6_1.NAOK,Q1_I7_1.NAOK)-sum(Q1_I5_1.NAOK,Q1_I6_1.NAOK,Q1_I7_1.NAOK))}
Joffm
The error message is not related to this.
It only says that you created a group that does not contain questions yet.