Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

get statistics from a group of questions

  • kosmas
  • kosmas's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 3 months ago #233049 by kosmas
Please help us help you and fill where relevant:
Your LimeSurvey version: [Version 2.00+ Build 131107]
Own server or LimeSurvey hosting: own server
Survey theme/template: bootstrap
==================

Hi there, 
I am trying to get statistics on the average of a group of 5 point questions.

I calculate the average of the group of answers with an equation type question accepting numeric values only, the result is correctly stored in the database but I can not get statistics for it. I. guess this is expected as equation results can be of any type.
 
So I set up another question of numeric type, set the relevance to zero and tried to set it's value from the equation but this does not work. The survey is not displayed correctly.
 
I also tried to set the value of the numeric question from the value of the equation with a javascript called on submit. Even though the field value is changed and posted to the server the value is not updated in the database.

I attach the survey I have used in my tests.

I will appreciate any help. Please note that upgrading to a newer version is not an option.

Thanks!
Attachments:

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 months ago #233052 by tpartner
Replied by tpartner on topic get statistics from a group of questions
I doubt you'll find anyone to test on 2.0 but if you set relevance to 0, no data will be recorded. Try hiding the question with CSS.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

  • kosmas
  • kosmas's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 3 months ago #233061 by kosmas
Replied by kosmas on topic get statistics from a group of questions
I forgot to mention that I change the relevance to 1 with javascript before submit.

Anyway, hiding the question with CSS sounds like a nice idea. I 'll give it a try.

Thanks

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 months ago #233072 by holch
Replied by holch on topic get statistics from a group of questions
Why don't you simply hide the relevance question via the GUI (Always hide this question)?

Or maybe this didn't exist in LS 2, can't remember.

And even if it is not an option: You should seriously think about an upgrade. If not now, then after the survey. You are collecting data with a software that is almost 9 years old and exposed to the internet.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

  • kosmas
  • kosmas's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 3 months ago #233076 by kosmas
Replied by kosmas on topic get statistics from a group of questions
If it is set to always hide the question then it is not saved in database, at least this is how it works in LS2.

I agree with you, this installation should be upgraded or abandoned, but it is not possible now.

Anyway, thanks for your answer.

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 months ago #233077 by holch
Replied by holch on topic get statistics from a group of questions

If it is set to always hide the question then it is not saved in database, at least this is how it works in LS2.


That is not how it works in LS3 and LS5. The only limitation with an equation hidden via "Always hide this question" in these versions is that you can't access the answer via Javascript, because it doesn't exist in the the source code of the questionnaire (but it does exist in the database).

If it is not saved in the database in LS2, then it must have changed since then.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 months ago #233078 by Joffm
Replied by Joffm on topic get statistics from a group of questions
Hi,
Make it easy!
Group1:
Your two questions (5-point)
Question 1
Question 2

Group2:
Equation "eqMean" where you assign the result to the following question of type "numerical input"
{QAverage=sum(Q1,Q2)/count(Q1,Q2)}
QAverage: Question of type "numerical input"
Both questions "Always hide this question"

That's all.
 
 
 
 


 

File Attachment:

File Name: limesurvey...7871.lss
File Size:14 KB

This all was done in version 2.06
As said before "You wpn't find anybody with your stone age version."

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: kosmas

Please Log in to join the conversation.

  • kosmas
  • kosmas's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 3 months ago #233104 by kosmas
Replied by kosmas on topic get statistics from a group of questions
So the problem was that I tried to do it within the same question group. Moving the equation and numeric field in a different group solved the problem.

Thanks!

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose