My survey contains 14 question groups.
At the end of the survey I display a result per question group in percentage.
For that purpose I have defined an equation type question (always hidden) summing up the assessment values of the answers.
e.g. DD1CALC for the question group DD1
So far so good... the percentage shows on the end page of the survey.
Now I would like to give the respondent some information at the end of the question group depending on the percentage achieved.
I therefore created an equation type question (not hidden) containing the following IF statement:
{if(DD1CALC<40,'You score less than 40% for these questions. You have still some work to do',if(DD1CALC>80,'You score more than 80% for these questions. You are well on the way !','You score average on these questions. I suggest you discuss your answers with your therapist'))}
This does not work. It appears as if EM can not evaluate the value behind my DD1CALC variable.
It does work if I copy the full calculation previously used in the definition of DD1CALC, but that means an incredible amount of work as my survey contains 128 questions in 14 different question groups.
Well, here we go. If DD1CALC is placed after the question where you want to use it, how can this question use it? It is only calculated in the future...
Help us to help you!
Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
Hi Holch,
Thanks for picking up my question.
Attached you find an extract of the survey.
The subject is pretty sensitive (the impact of sexual abuse on children).
I hope you had no such experience in your youth as it may then contain triggers for you.
We are using LS 2.06
in the example, question IFTEST1 works fine, but means an awful lot of work.
Question IFTEST2 is the way I would like to do it, but it doesn't work.
Looking forward to hearing from you again.
Have a great day.
I think the editor is messing with your "<" and ">" operators. Replacing them with "LT" and "GT" respectively and introducing a space before and after the operator seems to work.
Thanks again Tony, but to no avail....
Upon entering the first answer, the question disappears (??!!??) and never shows up again.
To take away some confusion, better to delete IFTEST1 as that one works and you may think that the problem is solved.
Hope you have some more ideas or am I approaching the border of what is possible with LS ?
Cheers, Ton