Create a Final Survey Question: Sum of all Array values

Plus d'informations
il y a 10 mois 1 semaine #184844 par bpbpbp
Hi!

This is my first post and my first trial survey creation.

I have 1 survey, 1 question group with 7 questions.

Question #1, #3 and #5 are all Array(5) questions, storing values 1 to 5 I presume, each with 4 sub-questions.

I create a final question (#7) as an Equation, and I want to know the correct code to sum all sub-questions of #1, #3 and #5.

I don't know where to begin, and the documentation is very detailed but overwhelming..

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 10 mois 1 semaine #184848 par holch
You will not manage to work with equations without reading about EM within the manual. But I can understand that it is overwhelming. To find out on how to address a certain question/subquestion/answer, it helps to look at the question logic files, because it shows you, how this is addressed.

Now here an example for array questions. You have two factors here that you need to take in to account: subquestions and answer options.

As you want to know the value of the answer option, you to read this into your equation, which can be done by something like this:
{questioncode_subquestioncode}

So let's assume your first question has the question code "Q1" and the subquestions are called SQ1, SQ2, SQ3 and SQ4.

So you'll get the answer code subquestion 1 like this:
{Q1_SQ1}

So to get a sum of all responses to Q1 you would do something like:
{sum(Q1_SQ1, Q1_SQ2, Q1_SQ3, Q1_SQ4)}

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 mois 1 semaine #184850 par DenisChenu
Personnaly my advice for equatiuon is

1. use gui editor equation to know Question Variables
2. Start with simple part : == != ge …
3. Add count an sum
4. After : get a bookmark to EM available function …

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 .
An error happen ? Before make a new topic : remind the Debug mode .

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 mois 5 jours #184933 par bpbpbp
Thank you I will give it a try!

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 mois 5 jours #184934 par bpbpbp
Thanks for your suggestion, however as a newbie I don't understand your instructions at all, sorry!

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 mois 5 jours #184939 par DenisChenu

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 .
An error happen ? Before make a new topic : remind the Debug mode .

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 mois 4 jours #184972 par cdorin

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!