- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Show Question based on 2 yes items from multiple questions
- andogro144
- Topic Author
- Offline
- New Member
Less
More
10 years 3 weeks ago #107076
by andogro144
Show Question based on 2 yes items from multiple questions was created by andogro144
I have a survey where a question is asked based on endorsements of 2 previous questions. There are 8 items previously which are y/n questions. If a user says yes to 2 or more of these than we ask the next question. I am struggling with what logic to use here, as there are many possible combinations, and it can't just be yes to 1 item, but must be 2 or more.
Would it make sense to create an equation question that sums these up and ask based on that? If so a pointer to an example would be great!
Here is a simplified example (there are also questions in between these, so would be pulling them out from a longer list).
Did alcohol make you feel:
anxious y/n
sick y/n
depressed y/n
restless y/n
hallucinate y/n
seizures y/n
headaches y/n
sweating y/n
If yes to 2 or more above, then ask:
did this cause problems for you.
Thanks for any insight!
Would it make sense to create an equation question that sums these up and ask based on that? If so a pointer to an example would be great!
Here is a simplified example (there are also questions in between these, so would be pulling them out from a longer list).
Did alcohol make you feel:
anxious y/n
sick y/n
depressed y/n
restless y/n
hallucinate y/n
seizures y/n
headaches y/n
sweating y/n
If yes to 2 or more above, then ask:
did this cause problems for you.
Thanks for any insight!
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
10 years 2 weeks ago - 10 years 2 weeks ago #107089
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Show Question based on 2 yes items from multiple questions
Hi,
if Question code are ALC and each alcahol are SQ01,SQ02 ...
or maybe you can try:
but this one is not tested
if Question code are ALC and each alcahol are SQ01,SQ02 ...
Code:
sum(ALC_SQ01=="Y",ALC_SQ02=="Y" .... ,ALC_SQ10=="Y")>=2
Code:
sumifop("==","Y",ALC.that)>=2
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 10 years 2 weeks ago by DenisChenu.
The topic has been locked.
- andogro144
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
10 years 2 weeks ago #107325
by andogro144
Replied by andogro144 on topic Show Question based on 2 yes items from multiple questions
Thanks Denis, I appreciate your help! Worked when I deleted other conditions and put into the relevance equation field.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13624
- Thank you received: 2490
10 years 2 weeks ago #107340
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Show Question based on 2 yes items from multiple questions
Yes, need to delete condition.
Did you test the sumifop ?
Denis
Did you test the sumifop ?
Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.