Welcome to the LimeSurvey Community Forum

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

Calculating Results - Best Practices Recommendation

  • teracomp
  • teracomp's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
7 years 5 months ago #143189 by teracomp
I'm creating a survey that has 30 required items using an Array by Column question type.
Each question contains two subquestions, Most and Least
There are four statements for each question and the respondent selects which one of the group is Most or Least.
(please see attached for example).
Each question contributes to one of four "buckets" for Most and for Least. For example, the first question has four statements:
  1. enjoys having fun
  2. enjoys challenges
  3. follows rules
  4. uncomfortable with change
If the user marks the first option as Most, bucket #2 is incremented
If the user marks the third option as Least, bucket #4 is incremented

At the end of the survey, the total in each bucket is used to create two separate graphs; essentially the total bucket counts for Most and Least.

The question is this: Should I have an Equation Question between each of the 30 questions to keep a running count of the bucket count OR should I have a large Equation Question at the end that adds up all 30 Most and Least responses?

It seems like one large equation at the end would be the way to go, but with 30 Most and 30 Least responses, that might be a rather large equation.

Dave Phillips
The topic has been locked.
  • teracomp
  • teracomp's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
7 years 5 months ago #143191 by teracomp
For the time being, I've decided to calculate results at the end for each bucket. I've created hidden Equation Questions with this type of equation:
BucketA
{sum(if(Q1_SQ1=='A2',1,0), if(Q2_SQ1=='A2',1,0), if(Q3_SQ1=='A3',1,0), if(Qn_SQn=='Xn',1,0)...)}

Then reporting the summary with the results.
The secret here is the underscore notation, e.g., Q1_SQ1. Once I figured that out, the bucket counting was trivial.

Of course, I'd like to graph them for the user! But that's another adventure.

Really like LimeSurveys! Getting smarter.

Dave Phillips
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago #143200 by Joffm
Hi, teracomp,

well, the underscore is not a secret, it's normal behaviour if you have subquestions.
manual.limesurvey.org/Expression_Manager...on_with_subquestions

In your previous question about your buckets, IMHO you were using single punch questions.

Well, to answer your question:

I would calculate all buckets at the end of this section.
The equations for each bucket stay the same, but it's easier to handle and maintain.
E.g. you could create a special group for these equations.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: teracomp
The topic has been locked.
  • teracomp
  • teracomp's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
7 years 5 months ago #143203 by teracomp
Thank you for affirming the decision to calculate buckets at the end. I'm still learning syntax, workflow, etc., so each additional pass through the documentation I find something new. In this case, the proper way to reference subquestions.
And thanks for providing the link to EM Examples. There are so many features included in LimeSurvey that it's a challenge to learn, but it's well worth the challenge.
I really appreciate this forum -- your quick response is greatly appreciated! :)

Dave Phillips
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose