Hi,
there are a few misunderstandings from your side.
You have single punch questions like A11
Code, Assessment Value , Answer text
A001, 20, Know well
A002, 10, Know little
A003, 0, No idea
Now you tried the following formulas:
1.
{sum(if(A11!=20,10,0),if(A12!=20,10,0),if(A13!=20,10,0),if(A14!=20,10,0),if(A15!=20,10,0))}
Did you understand what this IF-statement means?
It says "IF A11 is not equal to 20, then it is 10, otherwise it is 0"
Here the mistake is:
You coded A11 with alphanumerical codes "AO01",...
And these should be used in this IF-statement.
Now you compare A11 with a number, but the answer codes are "AO01", "AO02",...
So to do it like this you had to compare each
{sum(if(A11=="AO01",20,if(A11=="AO02",10,0)),if(A12=="AO01",20,if(A12=="AO02",10,0)),...}
Meaning: "IF A11 is equal to AO01, sum 20, otherwise IF A11 is equal to AO02, sum 10, otherwise sum 0"
Not the best way.
But you used assessment values. So as you find in the manual:
www.limesurvey.org/manual/ExpressionScri...#Access_to_variables
QCode.value / QCode.valueNAOK contains the selected assessment value.
So your sum is just
{sum(A11.valueNAOK,A12.valueNAOK,A13.valueNAOK,A14.valueNAOK,A15.valueNAOK)}
That's all.
Nothing else to say to the other tries.
Always you try to sum text, or to convert text.
{sum(intval(A11),intval(A12),intval(A13),intval(A14),intval(A14))}
As A11, ... is not numeric, remember your answer codes are alphanumerical "AO01". So the intval will fail obviously
{sum((A11),(A12),(A13),(A14),(A15))}
{sum(A11,A12,A13,A14,A15)}
{sum(A11.NAOK,A12.NAOK,A13.NAOK,A14.NAOK,A15.NAOK)}
As A11, ... is not numeric, you cannot sum up text, it is like sum("apple", "cherry").
Joffm
P.S.
In my opinion you never should use the default alphanumerical codes in single punch questions. These are the codes you use in your analysis.