Welcome to the LimeSurvey Community Forum

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

How I can read the number of cases and apply a conditional?

  • Acmelive
  • Acmelive's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago #94757 by Acmelive
Hello,
I need to make a conditional that depends on the number of responses that have a particular category in a multiple choice question, how I can read the number of cases and apply a conditional?
(I have Limesurvey versión 1.92+ Build 120822)
Best regards
The topic has been locked.
More
10 years 11 months ago - 10 years 11 months ago #94884 by orvil
Hi,

maybe the best way ist to use the EM (I'm not absolutely sure this will work in LS 1.92):

Let's say you defined a question Q1
with subitems SQ001, SQ002 and SQ003
with eg. 3 options: nice (=1), ugly (=2), neverseenbefore (=3)

So, if you want to display the question Q2 if at least two subquestions of Q1 are answered with 'nice' ore 'ugly', place the following expression in the relevance field of Q2:
if(Q1_SQ001==1 OR Q1_SQ001==2,1,0)+if(Q1_SQ002==1 OR Q1_SQ002==2,1,0)+if(Q1_SQ003==1 OR Q1_SQ003==2,1,0)>=2

Depending on your type of question and codes you will have to adapt the expression.

Best regards/Beste Grüße,
O. Villani
Last edit: 10 years 11 months ago by orvil. Reason: revision
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
10 years 11 months ago #94889 by Mazi
EM is definitely capable of doing this. If you attach a simpel test survey, we can have a look at the codes being used and provide some sample EM syntax.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 11 months ago #94923 by DenisChenu
Hello,

Think count is here for this:

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.

Lime-years ahead

Online-surveys for every purse and purpose