Need to calculate an average score on some survey questions

More
4 years 4 months ago #95740 by cchait
cchait created the topic: Need to calculate an average score on some survey questions
Hi anyone,

I have a survey with 3 pages and many questions.
I need to create an overall AVERAGE score for some of the questions contained on all 3 pages.
How can I do that??

Also, how can I calculate an AVERAGE score across each question for a range of responses? is that possible at all?

many thanks
Craig

Please Log in to join the conversation.

More
4 years 4 months ago #95745 by Ben_V
Ben_V replied the topic: Need to calculate an average score on some survey questions
Hi,
Look at this previous post , TMS White solution

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Please Log in to join the conversation.

More
4 years 4 months ago #95768 by cchait
cchait replied the topic: Need to calculate an average score on some survey questions
Thanks Ben_V,
Unfortunately so far no luck. I have version 1.92 and I added an equation question.
Im wanting to average arrays and multiple choice across 3 pages.
So I added something like {round(Valueformoney,RoomQuality,foodservice)}.... these being question codes...
However I get an undefined variable on the question codes.
Please see my attachments... what could I be doing wrong? I am not using JavaScript.
many thanks



Attachments:

Please Log in to join the conversation.

More
4 years 4 months ago #95815 by cchait
cchait replied the topic: Need to calculate an average score on some survey questions
Thanks Ben_V,
Unfortunately so far no luck. I have version 1.92 and I added an equation question.
Im wanting to average arrays and multiple choice across 3 pages.
So I added something like {round(Valueformoney,RoomQuality,foodservice)}.... these being question codes...
However I get an undefined variable on the question codes.
Please see my attachments... what could I be doing wrong? I am not using JavaScript.
many thanks





Attachments:

Please Log in to join the conversation.

More
4 years 4 months ago #95832 by DenisChenu
DenisChenu replied the topic: Need to calculate an average score on some survey questions
Hello,

Show complete "Survey logic files" screen cap please.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
4 years 4 months ago #95839 by cchait
cchait replied the topic: Need to calculate an average score on some survey questions
Hi Denis,
It seems the AVERAGE equation question seems to think its an undefined variable and is not recognizing the question code.





Attachments:

Please Log in to join the conversation.

More
4 years 4 months ago #95840 by cchait
cchait replied the topic: Need to calculate an average score on some survey questions
Actually Denis I think I fixed the error on question codes now from the survey logic - thanks... BUT
now I have an invalid argument on the rounding expression.

I need to calculate the average of MANY questions and here is a screen shot of the issue.
What expression should I use to calculate the average for many questions?
many thanks
Attachments:

Please Log in to join the conversation.

More
4 years 4 months ago #95841 by DenisChenu
DenisChenu replied the topic: Need to calculate an average score on some survey questions
Hello,

With array question type (for example ARRAY with SQ1 and SQ2), the code ARRAY mean nothing.

You can use ARRAY_SQ1 and ARRAY_SQ2 or that.ARRAY (mean the array of all subQ) . And round is not average, round is round: www.php.net/manual/en/function.round.php

If you need average: use {sum(that.ARRAY)/2} : if you want real average or {sum(that.ARRAY)/count(that.ARRAY)} if you need average for answered question only.

And please : look at the documentation : manual.limesurvey.org/Expression_Manager

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
4 years 4 months ago #95842 by cchait
cchait replied the topic: Need to calculate an average score on some survey questions
Hi Denis
I have it all calculating ok now.
last question... I hope..

I do not see the equation answer/total in the {ANSWERTABLE} when it generates it to an email of the response.
How can I show this question / answer on the basic and detailed admin notification email?
Is it because the question is hidden in the survey or because I don't have any CSS defined? If so what css logic do I add and to which file?

many thanks

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now