Welcome, Guest
Username: Password: Remember me

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

How I can read the number of cases and apply a conditional? 1 year 1 week ago #94757

  • Acmelive
  • Acmelive's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
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 administrator has disabled public write access.

How I can read the number of cases and apply a conditional? 1 year 1 week ago #94884

  • orvil
  • orvil's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 84
  • Thank you received: 3
  • Karma: 4
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: 1 year 1 week ago by orvil. Reason: revision
The administrator has disabled public write access.

How I can read the number of cases and apply a conditional? 1 year 6 days ago #94889

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5279
  • Thank you received: 289
  • Karma: 246
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)limesurvey.org'"
The administrator has disabled public write access.

How I can read the number of cases and apply a conditional? 1 year 5 days ago #94923

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 5850
  • Thank you received: 716
  • Karma: 222
Hello,

Think count is here for this:
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.155 seconds
Donation Image