Welcome, Guest
Username: Password: Remember me

TOPIC: Need to calculate an average score on some survey questions

Need to calculate an average score on some survey questions 11 months 2 weeks ago #95740

  • cchait
  • cchait's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
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
The administrator has disabled public write access.

Need to calculate an average score on some survey questions 11 months 2 weeks ago #95745

  • Ben_V
  • Ben_V's Avatar
  • NOW ONLINE
  • Platinum Lime
  • Posts: 943
  • Thank you received: 195
  • Karma: 63
Hi,
Look at this previous post, TMS White solution
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
The administrator has disabled public write access.

Need to calculate an average score on some survey questions 11 months 2 weeks ago #95768

  • cchait
  • cchait's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
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

LSequation1.jpg


LSequation2.jpg
The administrator has disabled public write access.

Need to calculate an average score on some survey questions 11 months 2 weeks ago #95815

  • cchait
  • cchait's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
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



LSequation1_2013-05-09.jpg


LSequation2_2013-05-09.jpg
The administrator has disabled public write access.

Need to calculate an average score on some survey questions 11 months 2 weeks ago #95832

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 5875
  • Thank you received: 722
  • Karma: 223
Hello,

Show complete "Survey logic files" screen cap please.

Denis
The administrator has disabled public write access.

Need to calculate an average score on some survey questions 11 months 2 weeks ago #95839

  • cchait
  • cchait's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Hi Denis,
It seems the AVERAGE equation question seems to think its an undefined variable and is not recognizing the question code.

LSequation3.jpg


LSequation4.jpg


LSequation5.jpg
The administrator has disabled public write access.

Need to calculate an average score on some survey questions 11 months 2 weeks ago #95840

  • cchait
  • cchait's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
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
LSequation6.jpg
The administrator has disabled public write access.

Need to calculate an average score on some survey questions 11 months 2 weeks ago #95841

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 5875
  • Thank you received: 722
  • Karma: 223
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
The administrator has disabled public write access.

Need to calculate an average score on some survey questions 11 months 2 weeks ago #95842

  • cchait
  • cchait's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
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
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.119 seconds
Donation Image