Tally with Non-Applicable

Hi,

I’m wondering how it is possible to create three options for multiple
choice questions with the values of 1 for yes, 0 for no, and 0 for
non-applicable.

However, when I try to add 0 as the “choice label” and 'N/A" for the label,
I receive an error saying that this choice value has already been used.
Does anyone have any ideas on how to get around? The value of n/a doesn’t
have to be zero, but I when I tally up the scores, I don’t want the 'n/a’
selected to be included in the tally.

Thank you!!

CommCare doesn’t allow two identical values field

··· Le vendredi 20 mai 2016 08:05:09 UTC, Ann Duong a écrit : > > Hi, > > I'm wondering how it is possible to create three options for multiple > choice questions with the values of 1 for yes, 0 for no, and 0 for > non-applicable. > > However, when I try to add 0 as the "choice label" and 'N/A" for the > label, I receive an error saying that this choice value has already been > used. Does anyone have any ideas on how to get around? The value of n/a > doesn't have to be zero, but I when I tally up the scores, I don't want the > 'n/a' selected to be included in the tally. > > Thank you!! >

Update for those who may have this issue as well. We found a workaround!
Again it may not be the most elegant.

We ended up making the n/a value equal to 1000.

From there we used div and mod to be able to tally up all the “yes” (value

  1. as well as all the “n/a”
··· On Friday, May 20, 2016 at 10:05:09 AM UTC+2, Ann Duong wrote: > > Hi, > > I'm wondering how it is possible to create three options for multiple > choice questions with the values of 1 for yes, 0 for no, and 0 for > non-applicable. > > However, when I try to add 0 as the "choice label" and 'N/A" for the > label, I receive an error saying that this choice value has already been > used. Does anyone have any ideas on how to get around? The value of n/a > doesn't have to be zero, but I when I tally up the scores, I don't want the > 'n/a' selected to be included in the tally. > > Thank you!! >

Hi Ann,

In the example you are describing you can actually just ignore the message
if you want to. The warning is meant to highlight that you have duplicate
choice values since there could be a couple of issues:

  • when analyzing the data you won’t be able to tell what the user
    selected - it might not always matter but good to be aware that you would
    just see a value like 0 and not know which of the actual responses it
    corresponds to
  • sometimes CommCare might not “remember” which choice was selected; that
    is if you answer a question that has two options with the same choice
    value, swipe to another question, and then swipe back, the another choice
    with the same choice value might be selected.
    If these seem like they might be problems it may be safer to follow the
    instructions to create hidden values to calculate the scores:
    https://confluence.dimagi.com/display/commcarepublic/Creating+a+Score+Tally

Hope this helps,

Jeremy

··· On Fri, May 20, 2016 at 6:05 AM, Babacar Gueye wrote:

CommCare doesn’t allow two identical values field

Le vendredi 20 mai 2016 08:05:09 UTC, Ann Duong a écrit :

Hi,

I’m wondering how it is possible to create three options for multiple
choice questions with the values of 1 for yes, 0 for no, and 0 for
non-applicable.

However, when I try to add 0 as the “choice label” and ‘N/A" for the
label, I receive an error saying that this choice value has already been
used. Does anyone have any ideas on how to get around? The value of n/a
doesn’t have to be zero, but I when I tally up the scores, I don’t want the
’n/a’ selected to be included in the tally.

Thank you!!


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.

Hi Jeremy,

Thanks for your response! It was really helpful. I’m wondering if you could
clarify a bit more though.

We do need to be able to distinguish between ‘no’ and ‘n/a’. I’m wondering
if you know the best way to do this? I’m still having a bit of trouble even
after looking at the link you sent.

We have numerous questions with the choices of ‘yes = 1,’ ‘no = 0,’ and
’n/a = ??.’ After answer all the questions, we need be able to tally the
scores to find the total. Additionally, we also need to find the potential
total of all the questions so that we can then find the mean (i.e.
actual-total div potential-total). I was thinking of perhaps using the 'if’
statement, but not actually sure how to use it. Any guidance would be
appreciated!!

Example:

Question 1 | Selected: yes
Question 2 | Selected: yes
Question 3 | Selected: no
Question 4 | Selected: n/a

Total Score: 2
Potential Total Score: 3

Thank you!!

··· On Monday, May 23, 2016 at 3:42:51 AM UTC+2, Jeremy Wacksman wrote: > > Hi Ann, > > In the example you are describing you can actually just ignore the message > if you want to. The warning is meant to highlight that you have duplicate > choice values since there could be a couple of issues: > - when analyzing the data you won't be able to tell what the user > selected - it might not always matter but good to be aware that you would > just see a value like 0 and not know which of the actual responses it > corresponds to > - sometimes CommCare might not "remember" which choice was selected; that > is if you answer a question that has two options with the same choice > value, swipe to another question, and then swipe back, the another choice > with the same choice value might be selected. > If these seem like they might be problems it may be safer to follow the > instructions to create hidden values to calculate the scores: > https://confluence.dimagi.com/display/commcarepublic/Creating+a+Score+Tally > > Hope this helps, > > Jeremy > > > On Fri, May 20, 2016 at 6:05 AM, Babacar Gueye <bcg...@gmail.com > wrote: > >> CommCare doesn't allow two identical values field >> >> >> Le vendredi 20 mai 2016 08:05:09 UTC, Ann Duong a écrit : >>> >>> Hi, >>> >>> I'm wondering how it is possible to create three options for multiple >>> choice questions with the values of 1 for yes, 0 for no, and 0 for >>> non-applicable. >>> >>> However, when I try to add 0 as the "choice label" and 'N/A" for the >>> label, I receive an error saying that this choice value has already been >>> used. Does anyone have any ideas on how to get around? The value of n/a >>> doesn't have to be zero, but I when I tally up the scores, I don't want the >>> 'n/a' selected to be included in the tally. >>> >>> Thank you!! >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "commcare-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-user...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Jeremy Wacksman > Dimagi , Inc. > >

Hi Ann,

One approach would be to have two hidden values for each question. So for
question 1 you would have
question1_no with calculation if(/data/question1 = “no”, 1,’’)
question1_na with calculation if(/data/question1 = “na”, 1,’’)

Then at the end you could sum all of the _no and _na hidden values like:
total_no with calculation /data/question1_no + /data/question2_no + etc.
total_na with calculation /data/question1_na + /data/question2_na + etc…

However that approach does seem cumbersome and requires a lot of hidden
values, so maybe someone else on this list will have a more elegant
approach.

Jeremy

··· On Mon, May 23, 2016 at 8:34 AM, Ann Duong wrote:

Hi Jeremy,

Thanks for your response! It was really helpful. I’m wondering if you
could clarify a bit more though.

We do need to be able to distinguish between ‘no’ and ‘n/a’. I’m wondering
if you know the best way to do this? I’m still having a bit of trouble even
after looking at the link you sent.

We have numerous questions with the choices of ‘yes = 1,’ ‘no = 0,’ and
’n/a = ??.’ After answer all the questions, we need be able to tally the
scores to find the total. Additionally, we also need to find the potential
total of all the questions so that we can then find the mean (i.e.
actual-total div potential-total). I was thinking of perhaps using the 'if’
statement, but not actually sure how to use it. Any guidance would be
appreciated!!

Example:

Question 1 | Selected: yes
Question 2 | Selected: yes
Question 3 | Selected: no
Question 4 | Selected: n/a

Total Score: 2
Potential Total Score: 3

Thank you!!

On Monday, May 23, 2016 at 3:42:51 AM UTC+2, Jeremy Wacksman wrote:

Hi Ann,

In the example you are describing you can actually just ignore the
message if you want to. The warning is meant to highlight that you have
duplicate choice values since there could be a couple of issues:

  • when analyzing the data you won’t be able to tell what the user
    selected - it might not always matter but good to be aware that you would
    just see a value like 0 and not know which of the actual responses it
    corresponds to
  • sometimes CommCare might not “remember” which choice was selected; that
    is if you answer a question that has two options with the same choice
    value, swipe to another question, and then swipe back, the another choice
    with the same choice value might be selected.
    If these seem like they might be problems it may be safer to follow the
    instructions to create hidden values to calculate the scores:
    https://confluence.dimagi.com/display/commcarepublic/Creating+a+Score+Tally

Hope this helps,

Jeremy

On Fri, May 20, 2016 at 6:05 AM, Babacar Gueye bcg...@gmail.com wrote:

CommCare doesn’t allow two identical values field

Le vendredi 20 mai 2016 08:05:09 UTC, Ann Duong a écrit :

Hi,

I’m wondering how it is possible to create three options for multiple
choice questions with the values of 1 for yes, 0 for no, and 0 for
non-applicable.

However, when I try to add 0 as the “choice label” and ‘N/A" for the
label, I receive an error saying that this choice value has already been
used. Does anyone have any ideas on how to get around? The value of n/a
doesn’t have to be zero, but I when I tally up the scores, I don’t want the
’n/a’ selected to be included in the tally.

Thank you!!


You received this message because you are subscribed to the Google
Groups “commcare-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.

Hi Jeremy,

Thanks for your response. How would this work for question 1 that may be
repeated X number of times determined by the user afterwards answering the
questions? Any help would be appreciated!

For instance, I have the following.

Group A_Repeated (ONCE)

Question 1 | Selected: yes
Question 2 | Selected: yes
Question 3 | Selected: no
Question 4 | Selected: n/a

Group A_Repeated (TWICE)

Question 1 | Selected: no
Question 2 | Selected: no
Question 3 | Selected: no
Question 4 | Selected: n/a

Group B_Repeated (ONCE)

Question 1 | Selected: yes
Question 2 | Selected: yes
Question 3 | Selected: Yes
Question 4 | Selected: n/a

Group B_Repeated (TWICE)

Question 1 | Selected: yes
Question 2 | Selected: yes
Question 3 | Selected: no
Question 4 | Selected: n/a

··· On Tuesday, May 24, 2016 at 9:27:28 PM UTC+2, Jeremy Wacksman wrote: > > Hi Ann, > > One approach would be to have two hidden values for each question. So for > question 1 you would have > question1_no with calculation if(/data/question1 = "no", 1,'') > question1_na with calculation if(/data/question1 = "na", 1,'') > > Then at the end you could sum all of the _no and _na hidden values like: > total_no with calculation /data/question1_no + /data/question2_no + etc. > total_na with calculation /data/question1_na + /data/question2_na + etc... > > However that approach does seem cumbersome and requires a lot of hidden > values, so maybe someone else on this list will have a more elegant > approach. > > Jeremy > > On Mon, May 23, 2016 at 8:34 AM, Ann Duong <abd...@gmail.com wrote: > >> Hi Jeremy, >> >> Thanks for your response! It was really helpful. I'm wondering if you >> could clarify a bit more though. >> >> We do need to be able to distinguish between 'no' and 'n/a'. I'm >> wondering if you know the best way to do this? I'm still having a bit of >> trouble even after looking at the link you sent. >> >> We have numerous questions with the choices of 'yes = 1,' 'no = 0,' and >> 'n/a = ??.' After answer all the questions, we need be able to tally the >> scores to find the total. Additionally, we also need to find the potential >> total of all the questions so that we can then find the mean (i.e. >> actual-total div potential-total). I was thinking of perhaps using the 'if' >> statement, but not actually sure how to use it. Any guidance would be >> appreciated!! >> >> >> Example: >> >> Question 1 | Selected: yes >> Question 2 | Selected: yes >> Question 3 | Selected: no >> Question 4 | Selected: n/a >> >> Total Score: 2 >> Potential Total Score: 3 >> >> >> Thank you!! >> >> >> On Monday, May 23, 2016 at 3:42:51 AM UTC+2, Jeremy Wacksman wrote: >>> >>> Hi Ann, >>> >>> In the example you are describing you can actually just ignore the >>> message if you want to. The warning is meant to highlight that you have >>> duplicate choice values since there could be a couple of issues: >>> - when analyzing the data you won't be able to tell what the user >>> selected - it might not always matter but good to be aware that you would >>> just see a value like 0 and not know which of the actual responses it >>> corresponds to >>> - sometimes CommCare might not "remember" which choice was selected; >>> that is if you answer a question that has two options with the same choice >>> value, swipe to another question, and then swipe back, the another choice >>> with the same choice value might be selected. >>> If these seem like they might be problems it may be safer to follow the >>> instructions to create hidden values to calculate the scores: >>> https://confluence.dimagi.com/display/commcarepublic/Creating+a+Score+Tally >>> >>> Hope this helps, >>> >>> Jeremy >>> >>> >>> On Fri, May 20, 2016 at 6:05 AM, Babacar Gueye wrote: >>> >>>> CommCare doesn't allow two identical values field >>>> >>>> >>>> Le vendredi 20 mai 2016 08:05:09 UTC, Ann Duong a écrit : >>>>> >>>>> Hi, >>>>> >>>>> I'm wondering how it is possible to create three options for multiple >>>>> choice questions with the values of 1 for yes, 0 for no, and 0 for >>>>> non-applicable. >>>>> >>>>> However, when I try to add 0 as the "choice label" and 'N/A" for the >>>>> label, I receive an error saying that this choice value has already been >>>>> used. Does anyone have any ideas on how to get around? The value of n/a >>>>> doesn't have to be zero, but I when I tally up the scores, I don't want the >>>>> 'n/a' selected to be included in the tally. >>>>> >>>>> Thank you!! >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "commcare-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to commcare-user...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> Jeremy Wacksman >>> Dimagi , Inc. >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "commcare-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-user...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Jeremy Wacksman > Dimagi , Inc. > >

Hi Ann,

I’m not totally sure but I think you would just use the same approach
described here:
https://groups.google.com/d/msg/commcare-users/5U5leWR2XQo/HvtzybaGBwAJ
That is, you would have a hidden value outside of the repeat group which
uses sum() to count up whatever was entered, and then you can in turn use
that hidden value in a “master” hidden value that adds up everything.

Jeremy

··· On Wed, Jun 1, 2016 at 7:47 AM, Ann Duong wrote:

Hi Jeremy,

Thanks for your response. How would this work for question 1 that may be
repeated X number of times determined by the user afterwards answering the
questions? Any help would be appreciated!

For instance, I have the following.

Group A_Repeated (ONCE)

Question 1 | Selected: yes
Question 2 | Selected: yes
Question 3 | Selected: no
Question 4 | Selected: n/a

Group A_Repeated (TWICE)

Question 1 | Selected: no
Question 2 | Selected: no
Question 3 | Selected: no
Question 4 | Selected: n/a

Group B_Repeated (ONCE)

Question 1 | Selected: yes
Question 2 | Selected: yes
Question 3 | Selected: Yes
Question 4 | Selected: n/a

Group B_Repeated (TWICE)

Question 1 | Selected: yes
Question 2 | Selected: yes
Question 3 | Selected: no
Question 4 | Selected: n/a

On Tuesday, May 24, 2016 at 9:27:28 PM UTC+2, Jeremy Wacksman wrote:

Hi Ann,

One approach would be to have two hidden values for each question. So for
question 1 you would have
question1_no with calculation if(/data/question1 = “no”, 1,’’)
question1_na with calculation if(/data/question1 = “na”, 1,’’)

Then at the end you could sum all of the _no and _na hidden values like:
total_no with calculation /data/question1_no + /data/question2_no + etc.
total_na with calculation /data/question1_na + /data/question2_na + etc…

However that approach does seem cumbersome and requires a lot of hidden
values, so maybe someone else on this list will have a more elegant
approach.

Jeremy

On Mon, May 23, 2016 at 8:34 AM, Ann Duong abd...@gmail.com wrote:

Hi Jeremy,

Thanks for your response! It was really helpful. I’m wondering if you
could clarify a bit more though.

We do need to be able to distinguish between ‘no’ and ‘n/a’. I’m
wondering if you know the best way to do this? I’m still having a bit of
trouble even after looking at the link you sent.

We have numerous questions with the choices of ‘yes = 1,’ ‘no = 0,’ and
’n/a = ??.’ After answer all the questions, we need be able to tally the
scores to find the total. Additionally, we also need to find the potential
total of all the questions so that we can then find the mean (i.e.
actual-total div potential-total). I was thinking of perhaps using the 'if’
statement, but not actually sure how to use it. Any guidance would be
appreciated!!

Example:

Question 1 | Selected: yes
Question 2 | Selected: yes
Question 3 | Selected: no
Question 4 | Selected: n/a

Total Score: 2
Potential Total Score: 3

Thank you!!

On Monday, May 23, 2016 at 3:42:51 AM UTC+2, Jeremy Wacksman wrote:

Hi Ann,

In the example you are describing you can actually just ignore the
message if you want to. The warning is meant to highlight that you have
duplicate choice values since there could be a couple of issues:

  • when analyzing the data you won’t be able to tell what the user
    selected - it might not always matter but good to be aware that you would
    just see a value like 0 and not know which of the actual responses it
    corresponds to
  • sometimes CommCare might not “remember” which choice was selected;
    that is if you answer a question that has two options with the same choice
    value, swipe to another question, and then swipe back, the another choice
    with the same choice value might be selected.
    If these seem like they might be problems it may be safer to follow the
    instructions to create hidden values to calculate the scores:
    https://confluence.dimagi.com/display/commcarepublic/Creating+a+Score+Tally

Hope this helps,

Jeremy

On Fri, May 20, 2016 at 6:05 AM, Babacar Gueye bcg...@gmail.com wrote:

CommCare doesn’t allow two identical values field

Le vendredi 20 mai 2016 08:05:09 UTC, Ann Duong a écrit :

Hi,

I’m wondering how it is possible to create three options for multiple
choice questions with the values of 1 for yes, 0 for no, and 0 for
non-applicable.

However, when I try to add 0 as the “choice label” and ‘N/A" for the
label, I receive an error saying that this choice value has already been
used. Does anyone have any ideas on how to get around? The value of n/a
doesn’t have to be zero, but I when I tally up the scores, I don’t want the
’n/a’ selected to be included in the tally.

Thank you!!


You received this message because you are subscribed to the Google
Groups “commcare-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.


You received this message because you are subscribed to the Google
Groups “commcare-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.