# Calculate Group Scores

10 months 1 week ago #190941 by gaartsen
Hi,

I have a group with 15 multiple choice questions. In order to get a 1 - 10 groupscore I have to add up all individual question scores, and the according to that number apply a number between 1 and 10.
I was under the assumption that Relevance equation outcomes would be applied to the question Code (QC being the variable holding the Relevance equation's value.

Apparently I was wrong, or at least I'm applying the logic wrong, and am hoping someone can point me in the right direction.
I am using LS 3.19.3, and attached a small test lss.

##### Attachments:

10 months 1 week ago - 10 months 1 week ago #190963 by holch
Replied by holch on topic Calculate Group Scores
I am a little confused what you are trying to do. Why would the relevance equatin be applied to the question code and especially how should that work.

Your question code is for example "G5Q00001", so what do you want to do with the equation and this code???

Also, you have your equations applied to two different places within your question, in the "help text" and the "Relevance equation". The relevance equation is there to hide or show a question, based on an equation ("Is it relevant?").

This is also why your questions don't show in the preview. Because their relevance equation is never true.

To calculate your scores, use a separate question of the type "Equation" and write your calculations into that. You can later hide it, when you are sure everything works as it should.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Last edit: 10 months 1 week ago by holch.
The following user(s) said Thank You: gaartsen

10 months 1 week ago #190964 by holch
Replied by holch on topic Calculate Group Scores
Here an example how it should work.

Of course, if you do not need the scores for each question separately, you could also include all calculations within the final equation question.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
##### Attachments:
The following user(s) said Thank You: gaartsen

10 months 1 week ago #190965 by gaartsen
Replied by gaartsen on topic Calculate Group Scores
Dear Holch,
Thank you very much for this explanation.

I added to code to the help section to try and understand what's happening.
As I mentioned in my op, my train of thoughts was way too much like a programmer (creating variables on the way to the end and using those variables later on). I now realise that the way I did id was indeed preventing me from seeing the survey in the first place. As you would have noticed I am a novice and I have to say, it's quite a steep learning curve. But I'll get there in the end Thanks again. Much appreciated.

10 months 1 week ago #190966 by gaartsen
Replied by gaartsen on topic Calculate Group Scores
Super!
That's exactly what I was after 10 months 1 week ago #190967 by holch
Replied by holch on topic Calculate Group Scores
It makes total sense to split the calculations, as it will allow you to understand better if the score for each question is calculated correctly. This is why in my example survey above you'll find 2 new equation questions that will calculate the scores for each question, and then the last equation will add them all up.

There is no way to "store" the score within the questions themselves and there is also no way to "access" the calculation you did for example in the "help text".

But this can all be saved via equation questions. Once you are done and are sure that the equation questions work well, you can use the "always hide" feature to hide these equation questions from the eyes of the participants.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: gaartsen