Using if statement in multiple selection

Greeting

I am having issues with calculation in multiple selections my question in kobo is:

my current calculation is if(selected(${Q1},‘b.’) and selected(${Q1},‘c.’),5,0)

please select the right answer Q1:

  1. A
  2. B
  3. C
  4. D

while B and C are correct, but if i choose all the options (A,B,C,D) it will still give a full mark but i want to calculate it if only B and C are chosen to give a full mark.

hi @alpha welcome to kobo community,

if(count-selected(${Q1}) = 2 and selected(${Q1},‘b’) and selected(${Q1},‘c’),5,0)

3 Likes

@MohammedTaleb, :clap: :heart: :partying_face:

1 Like