How summing values assigned to an answer and how assigning same values to different answer options

Hello everybody,

I have a multiple-choice query, I assigned a value to each answer but it is not possible to assigning the same value to different answers and neither making a sum of single values assigned, even when those values are completely different one from another.
For example:
Answer a: value 0 (incorrect)
Answer b: value 1 (correct)
Answer c: value 3 (correct)
If the person chooses the two correct answers, he/she will have a total score of 4. But I do not know how to make that sum and it seems it is possible to have only a single value.

In addition, if I have the following:
Answer a: value 0 (incorrect)
Answer b: value 2 (correct at the same degree of answer c)
Answer c: value 2 (correct at the same degree of answer b)
Is seems that it is not possible to assign the same value to different answers.

Much appreciated any help for the two issues.
Best, Natascia

Regarding your first issue:

Yes, it can be done. Try the following example as shown in the image below:

In the survey tab of your xlsform:

In the choices tab of your xlsform:
Image 2

Data entry screen as seen in Enketo:

Reference xlsform:
Calculation.xlsx (11.9 KB)

Regarding your second issue:

This is not possible as the name from the choices tab should be unique for that variable else you will see an error message. For more details, you could also have a look at the post discussed previously:

Dear Kal_Lam,

thank you very much for your support.
However, I tried to solve my first issue following your instructions but when I import the file the error message attached appears

draft_2.xlsx (26.1 KB) .

You may find attached my attempts (highlighted in yellow) both in survey and choice sheets.

Thanks again
Best, Natascia

Noticed two issues in your xlsform:

Issue 1:

There is a typo error with the use of coalesce. I could observe that you have used coalesce-at instead of coalesce.

Issue 2:

As said previously the name from the choices tab should be unique for that variable. Here i still see 2 being repeated twice as shown in the image below:

image

As an alternative, you could do as outlined in the image below:

In the survey form of your xlsform:

In the choices tab of your xlsform:
Image 2

Data entry screen as seen in Enketo:

Reference xlsform:
Calculation.xlsx (11.6 KB)

Hi Kal_lam,

thanks a lot. I solved all issues, including that of assigning the same value to different answers which was my need because one answer of the test might be correct at the same degree of another one. Please, have a look at the file attached.
MASTER_DEF_DEF.xlsx (26.6 KB)

Thank you very much,

Best, Natascia

1 Like

My advise would be, please validate your results with some dummy entry before you start your real data collection (especially with the duplicate choices that you have managed forcefully with the allow_choice_duplicates settings yes under the settings tab).

Hi Kal_Lam,

yes, I did some dummy entry and it seems fine.
Would you advice not to do that?
In such a way I might have the following:
total score for correct answering: 4
for some questions, it is needed to select two correct answers (score: 2+2) to reach the total positive score of 4.
as far as now, it seems that it can be selected two options and reach the score of 4.

Not sure I well explained myself.
Thanks a lot, Natascia

Would you mind trying a dummy entry with this variable (question’s option) and see what happens with the result:

image

I have a doubt on how your data would see while entering these choices for this variable (outlined above).

Hi Kal_Lam,

with the dummy entry the item 7.2.a. does work well. My problem (apparently solved now) was not on single choice but for multiple choices queries.

Why do you think it might cause problems?

Thank you
Best, Natascia

Hi @natascia
Just because all the response items other than the first one has their values as 0
image

Stephane

1 Like

Hi Stephane,
that Is a single choice query and It does work. Also for multiple choice queries It works with items with the same value by summing up the values and giving the Total score reached.
Do you think Is not correct my process?
Thank you
Best
Natascia

1 Like

Hi @natascia
That should be fine and it closes the issue as per the following

1 Like