Welcome to the LimeSurvey Community Forum

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

Calculate more than one score with a single survey

  • nicolepe
  • nicolepe's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 9 months ago #186207 by nicolepe
I am creating a survey that calculates the big 5 personality scores. It is basically a test with 80 questions divided in 5 areas, each with a different score. The questions are coded P001 to P080.

I have created a label set with the possible answer, identical to all questions: totally disagree, disagree, agree totally agree. The numerical values for the answer are 1, 2, 3, 4.

I need to calculate the 5 dimensions, so I have created 5 different equation questions.

One of the dimension contains the following formula:
{sum(P026,P052,P045,P069,P015,P072,P006,P066)}

The problem is that all the dimensions are 0, while they should contain the sum of the numerical values of the answers to the listed questions.

How do I achieve these calculations?

Many thanks,
Nicola.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 9 months ago #186234 by tpartner
Try this:

Code:
{sum(intval(P026), intval(P052), intval(P045), intval(P069), intval(P015),  intval(P072), intval(P006), intval(P066))}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 9 months ago #186261 by DenisChenu
And ALWAYS add .NAOK at end of question code .

If one question his hidden : return false for all.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose