- Posts: 9
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
{sum(if(Q1=="a",1,0),if(Q2=="c",1,0),...} , because i dont know which question will be selected.
Maybe the questions will be Q2, Q8, ...
you should show us exactly what and how you want to calculate.a bit similar to the one in this thread
Means: You have 300 questions to calculate.All 60 questions are Multiple choice and named Q01, Q02, ... Q60
Each question has 5 subquestions, Y scale (lines)
Seems to be a matrix(numbers). Or?Each subquestion has title A, B, C, D or E and sentences
The user can select 1 to 5 answers.
{count(that.Q01.sq_A.NAOK,that.Q02.sq_A.NAOK,that.Q03.sq_A.NAOK,...,that.Q60.sq_A.NAOK)}
I am not sure if it is a matrix, maybe i filled it wrong: when i added a new question type M, i put the 5 possible answers in "Subquestions"Seems to be a matrix(numbers). Or?
No one here wants or needs to see your original survey, but a LSS file helps to better understand what you are doing or where you are doing something wrong.unfortunately i can't share the lss, my client doesn't allow.
I am trying really hard but not there yet!But you wanted to tell us, that you were successful, didn't you?
I want to calculate the "total_score" for each answer A, B..., E:
total_scoreA = (scoreA in Q01)+(scoreA in Q02)+...(scoreA in Q60)
scoreA in Q01 = if (Q01 has been answered) and (one of the answer is A), then scoreAQ01 = [100/(nb of answers in Q01)], else 0
Example:
-- at Q01, user answered A, E and B
=> total answers 3
=> scoreA = 33, scoreE=33, scoreB=33 (scoreC=0 and scoreD=0)
-- at Q02, user answers A and D
=> total answers: 2
=> scoreA = 50, scoreD=50 (and scoreB and scoreC and scoreE=0)
in the end:
total_scoreA = 33+50
total_scoreB = 33 + 0
total_scoreC = 0 + 0
total_scoreD = 0 + 0
total_scoreE= 33 + 0
I tried to replace Q01NbRep by count(Q01.NAOK), but it says "undefined value".Instead of
for Q01: count(Q01_A.NAOK, Q01_B.NAOK, Q01_C.NAOK, Q01_D.NAOK, Q01_E.NAOK)
only count(Q01.NAOK)