Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi

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

Need to calculate an average score on some survey questions il y a 1 an 4 mois #95740

  • cchait
  • Portrait de cchait
  • Hors ligne
  • Fresh Lemon
  • Messages : 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
L'administrateur a désactivé l'accès en écriture pour le public.

Need to calculate an average score on some survey questions il y a 1 an 4 mois #95745

  • Ben_V
  • Portrait de Ben_V
  • Hors ligne
  • Platinum Lime
  • Messages : 1097
  • Remerciements reçus 247
  • Karma: 78
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...
L'administrateur a désactivé l'accès en écriture pour le public.

Need to calculate an average score on some survey questions il y a 1 an 4 mois #95768

  • cchait
  • Portrait de cchait
  • Hors ligne
  • Fresh Lemon
  • Messages : 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
L'administrateur a désactivé l'accès en écriture pour le public.

Need to calculate an average score on some survey questions il y a 1 an 4 mois #95815

  • cchait
  • Portrait de cchait
  • Hors ligne
  • Fresh Lemon
  • Messages : 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
L'administrateur a désactivé l'accès en écriture pour le public.

Need to calculate an average score on some survey questions il y a 1 an 4 mois #95832

  • DenisChenu
  • Portrait de DenisChenu
  • Hors ligne
  • Moderator Lime
  • Messages : 6358
  • Remerciements reçus 824
  • Karma: 245
Hello,

Show complete "Survey logic files" screen cap please.

Denis
L'administrateur a désactivé l'accès en écriture pour le public.

Need to calculate an average score on some survey questions il y a 1 an 4 mois #95839

  • cchait
  • Portrait de cchait
  • Hors ligne
  • Fresh Lemon
  • Messages : 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
L'administrateur a désactivé l'accès en écriture pour le public.

Need to calculate an average score on some survey questions il y a 1 an 4 mois #95840

  • cchait
  • Portrait de cchait
  • Hors ligne
  • Fresh Lemon
  • Messages : 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
L'administrateur a désactivé l'accès en écriture pour le public.

Need to calculate an average score on some survey questions il y a 1 an 4 mois #95841

  • DenisChenu
  • Portrait de DenisChenu
  • Hors ligne
  • Moderator Lime
  • Messages : 6358
  • Remerciements reçus 824
  • Karma: 245
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
L'administrateur a désactivé l'accès en écriture pour le public.

Need to calculate an average score on some survey questions il y a 1 an 4 mois #95842

  • cchait
  • Portrait de cchait
  • Hors ligne
  • Fresh Lemon
  • Messages : 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
L'administrateur a désactivé l'accès en écriture pour le public.
Modérateurs: ITEd
Temps de génération de la page : 0.139 secondes
Donation Image