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

More
4 years 2 weeks ago #94757 by Acmelive
Acmelive created the topic: How I can read the number of cases and apply a conditional?
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

Please Log in to join the conversation.

More
4 years 2 weeks ago - 4 years 2 weeks ago #94884 by orvil
orvil replied the topic: How I can read the number of cases and apply a conditional?
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: 4 years 2 weeks ago by orvil. Reason: revision

Please Log in to join the conversation.

More
4 years 2 weeks ago #94889 by Mazi
Mazi replied the topic: How I can read the number of cases and apply a conditional?
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
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
4 years 2 weeks ago #94923 by DenisChenu
DenisChenu replied the topic: How I can read the number of cases and apply a conditional?
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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now