Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

negative Answer Score in Assessment Mode

More
6 years 10 months ago #154170 by omtr
Hi LS community,

is it possible to get negative Values for certain Answers in Assessment Mode?

Example Assessment:
"Name some Countries in Europe":
  • Germany <-- Score: 1
  • France <-- Score: 1
  • Spain <-- Score: 1
  • Japan <-- Score: -1
  • Venezuela <-- Score: -1

I already tried to implement this with equations:

{sum(if(q0001_1.NAOK=="Y",1,0),if(q0001_2.NAOK=="Y",1,0),if(q0001_3.NAOK=="Y",1,0),if(q0001_4.NAOK=="Y",-1,0),if(q0001_5.NAOK=="Y",-1,0))}

In Version 2.5 this did not work, does anyone know if this is possible in the current release?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 10 months ago #154202 by tpartner
Replied by tpartner on topic negative Answer Score in Assessment Mode
This works for me in version Version 2.64.7:

Code:
{sum(if(Q1_SQ001.NAOK == 'Y', 1, 0), if(Q1_SQ002.NAOK == 'Y', 1, 0), if(Q1_SQ003.NAOK == 'Y', -1, 0), if(Q1_SQ004.NAOK == 'Y', -1, 0))}

Sample survey attached:

File Attachment:

File Name: limesurvey...5-04.lss
File Size:15 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose