Calculation for Multiple response questions *(select_multiple)

**I am building an XLS Form and I am stuck on select_multiple question calculations. I have option 1, Option 2, Option 3 and none which I want to score zero the option for none but the system is scoring it one even if I don't include it in the sum of the choices.

Below are the calculations I am using

if(selected-at(${qn4.6},0),1,0)
if(selected-at(${qn4.6},1),1,0)
if(selected-at(${qn4.6},2),1,0)
${qn4.6_cal0}+${qn4.6_cal1}+${qn4.6_cal2}

Hi @glule

so every time the none option is selected the result should be 0? even if other options are selected too?

for example:

  1. option1 and option2 are selected - the result is 2
  2. option1 and option none is selected - the result is 0

am I right?

Hi Lule,

The information you provide is not enough. It would be important to see the sheet 'choices' and confirm which values are associated with the labels Option1, Option2, Option3, and None. My guess is that perhaps you assigned the value "0" to the label None, therefore the formula if(selected-at(${qn4.6},0),1,0) = 1 and the sum would still greater than zero.

If none means that none of the option 1, 2 and 3 is correct (and therefore should not be selected), than I'd suggest you also add a constraint in the qn4.6 to ensure if 'none' is selected no other option can be chosen. To do so you can use:
not(count-selected(${qn4.6})>1 and selected-at(${qn4.6},'[value_none]'))

I hope this helps.

Best,
Andrea

I had used the expression if(selected-at(${qn1.3},0),1,0) for option 1 to 3 and if(selected-at(${qn1.3}, 99),0,0) for none but still none was being scored 1 not zero. What worked is this;
calculation column.
if(selected(${qn1.3},'1'),1,0)
if(selected(${qn1.3},'2'),1,0)
if(selected(${qn1.3},'3'),1,0)
if(selected(${qn1.3},'99'),0,0)

constraint column

not(count-selected(.) > 1 and selected(., '99')) for the condition "Cannot select None and another response"

@glule

you didn't answer my question so I can't be sure if I'm right but please try out this example: selectMultiple.xls (7 KB)

1 Like