- Posts: 12881
- Thank you received: 3965
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Get scores from specific answers across multiple List (Radio) questions
- gavt
- Topic Author
- Visitor
6 years 6 months ago #159105
by gavt
Get scores from specific answers across multiple List (Radio) questions was created by gavt
Hi all
Complete noob here trying to get up to speed with LimeSurvey. Not a programmer (although I can parse the logic) and not familiar with older LimeSurvey versions, so I'm finding the documentation a bit tricky to navigate.
I've been experimenting with branching questions and using relevance equations to display questions based on previous responses, albeit in a very simple way. What I am now trying to do is find out how I can get a total score (re assessment values) from specific answers across multiple questions.
A good analogy here is personality quizzes, or things like The Harry Potter Sorting Hat Quiz – rather than working with the assessment values from the quiz as a whole, it is tracking totals across specific sets of answers across the quiz as a whole (ie Personality Type A / Gryffindor answers, Personality Type B / Hufflepuff answers, etc).
For example, in my test survey I am working with List (Radio) questions. I have five questions with three answers each, and each answer is a shade of red, green or blue. I then want to display one of three questions once the first five have been answers – if 3/5 answers are a shade of red (eg Q1.A1 "Red", Q2.A3 "Scarlet", Q3.A2 "Vermillion", etc) then you get a 'red' question, if 3/5 answers are a shade of green then you get a 'green' question, etc.
Can anyone point me in the right direction? I've been playing around with relevance equations, conditions, hidden questions set to Equation with something in the Logic/Equation field – just getting nowhere with the docs or online searches.
Many thanks
gavt
Complete noob here trying to get up to speed with LimeSurvey. Not a programmer (although I can parse the logic) and not familiar with older LimeSurvey versions, so I'm finding the documentation a bit tricky to navigate.
I've been experimenting with branching questions and using relevance equations to display questions based on previous responses, albeit in a very simple way. What I am now trying to do is find out how I can get a total score (re assessment values) from specific answers across multiple questions.
A good analogy here is personality quizzes, or things like The Harry Potter Sorting Hat Quiz – rather than working with the assessment values from the quiz as a whole, it is tracking totals across specific sets of answers across the quiz as a whole (ie Personality Type A / Gryffindor answers, Personality Type B / Hufflepuff answers, etc).
For example, in my test survey I am working with List (Radio) questions. I have five questions with three answers each, and each answer is a shade of red, green or blue. I then want to display one of three questions once the first five have been answers – if 3/5 answers are a shade of red (eg Q1.A1 "Red", Q2.A3 "Scarlet", Q3.A2 "Vermillion", etc) then you get a 'red' question, if 3/5 answers are a shade of green then you get a 'green' question, etc.
Can anyone point me in the right direction? I've been playing around with relevance equations, conditions, hidden questions set to Equation with something in the Logic/Equation field – just getting nowhere with the docs or online searches.
Many thanks
gavt
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
6 years 6 months ago #159106
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Get scores from specific answers across multiple List (Radio) questions
Hello, gavt,
the best thing is to go through the sample surveys.
manual.limesurvey.org/Expression_Manager_sample_surveys
These you can import in your LS version and see hoe it works.
And on the other side: Please provide your sample survey, so we see what you are trying to do.
Regards
Joffm
the best thing is to go through the sample surveys.
manual.limesurvey.org/Expression_Manager_sample_surveys
These you can import in your LS version and see hoe it works.
And on the other side: Please provide your sample survey, so we see what you are trying to do.
Regards
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- tpartner
- Away
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
6 years 6 months ago #159114
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Get scores from specific answers across multiple List (Radio) questions
Let's say, for the sake of example that your "red" answer codes are Q1.A1, Q2.A3, Q3.A2, Q4.A4, Q5.A2...
Then the relevance for the following red question would be something like:
Then the relevance for the following red question would be something like:
Code:
sum(Q1 == 'A1', Q2 == 'A3', Q3 == 'A2', Q4 == 'A4', Q5 == 'A2') >= 3
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- gavinthomas
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
6 years 6 months ago #159130
by gavinthomas
Replied by gavinthomas on topic Get scores from specific answers across multiple List (Radio) questions
gavt here (account ban was down to a silly autoreply battle between LimeSurvey and the work email address I used...)
Joffm, thank you for pointing out the sample surveys – I'll dig into those.
tpartner, that line is exactly what I was looking for – thank you very much.
Really appreciate your help.
Joffm, thank you for pointing out the sample surveys – I'll dig into those.
tpartner, that line is exactly what I was looking for – thank you very much.
Really appreciate your help.
The topic has been locked.