Welcome to the LimeSurvey Community Forum

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

calcul d'une somme

  • VANBEERS
  • VANBEERS's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #199220 by VANBEERS
calcul d'une somme was created by VANBEERS
Bonjour,

Débutant, j'espère poser ma question au bon endroit.

J'ai réalisé un premier questionnaire de somnolence (Epworth) proposant pour chacune des 8 questions (EPW) 4 propositions (avec valeur d'affectation) sous forme de liste radio. A l'issue de la passation, je souhaite réalisé tout simplement une somme des valeurs d'affectation.
J'ai créé une dernière question (Q09) avec une réponse type equation pour réaliser ce calcul. J'ai inséré dans le champ "question" la formule :

{sum(that.EPW01.NAOK, that.EPW02.NAOK, that.EPW03.NAOK, that.EPW04.NAOK, that.EPW05.NAOK, that.EPW06.NAOK, that.EPW07.NAOK, that.EPW08.NAOK)}

afin de présenter le score au répondant.

Quelque soient les réponses, la somme est toujours nulle.

Pourriez-vous m'indiquer les erreurs commises ?

En vous remerciant.

Bien à vous
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago - 3 years 11 months ago #199227 by tpartner
Replied by tpartner on topic calcul d'une somme
English in this section of the forum please.

If all questions are list-radio you do not need to use "that.".

Assuming that the list-radios have numeric answer codes, try:

Code:
{sum(EPW01.NAOK, EPW02.NAOK, EPW03.NAOK, EPW04.NAOK, EPW05.NAOK, EPW06.NAOK, EPW07.NAOK, EPW08.NAOK)}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 11 months ago by tpartner.
The following user(s) said Thank You: cdorin
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose