Welcome to the LimeSurvey Community Forum

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

sum assessment values of dropdown radio answers

  • tpervaiz
  • tpervaiz's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 7 months ago #173176 by tpervaiz
I am creating an evaluation survey in which a participant does evaluation by selecting the answers of single dropdown radio.

For example: question is Promoter Standing in Designated Place and the radio answer with assessment values are (Is in place = 2, Not in place = 1, No Show = 0) the question code is q65 and answers codes are (A1, A2, A3)

Same as above I have created 10 to 12 question

Now at the end I need to sum the score of all the answers however if any question is left blank, the sum should be considered as 0 because i have some conditions in the survey too

Can some one help me on this as I am new to limesurvey

Many thanks in Advance
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 7 months ago #173179 by tpartner
Please refer to the manual - Qcode.valueNAOK - manual.limesurvey.org/Expression_Manager#Access_to_Variables

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: tpervaiz
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 7 months ago #173237 by Joffm
Hi,
why do you use the default answer codes "A1", "A2", ... ?
A1: Is in place
A2: Not in place
A3: No show
and not:
2: Is in place
1: Not in place
0: No show

Then "sum(q65.NAOK,q66.NAOK,...)" gives the score.

Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: tpervaiz
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 7 months ago #173245 by tpartner
The problem with using answer codes as scoring values is that you cannot have multiple equal values in a question. For example, you cannot have several answers with a value of 1 within the same question. That is why using assessment values and qCode.value is frequently a far more flexible solution.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 7 months ago #173249 by Joffm
Tony, of course you are absolutely right about multiple equal values.
I referred to tpervaiz's example.

I always have in mind a later analysis in SPSS or whatever. Assessment values are not stored in the database.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 7 months ago #173253 by tpartner
Yes, I understand that assessment values aren't stored directly, that's why I often use qCode.value to create my own "score" and then store that.

As for SPSS - recoding. :)

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