I am trying to make a calculation of 17 questions together, to get a sum score,
I have looked at the very helpful article of Stephane Aloo: https://support.kobotoolbox.org/en/articles/1913851-advanced-use-of-calculate-questions
As Stephane describes in his part of ‘work around for caculations’, I would like to create dummy variables first as well, and then make a sumscore for all dummies together.
But the difference for us is that there is not just one response options that needs to be kept, but actually two.
The response options in our case are:
- PSC 0 never
- PSC 1 sometimes
- PSC 2 often
- PSC 66 Participant did not understand question
- PSC 88 (If voluntary mentioned) Don’t know
- PSC 99 (If voluntary mentioned) refused
So in this case we would like to sum up all 1’s and 2’s. So therefore I think we should have a nested ‘if’, like this:
Also for some items we use reverse scoring, so came up with:
But now it is giving an error code, see attached, for some of the items (only the one with double digits. So e.g.:
The first ones are not giving an error code in kobo:
How to get this calculation working?
Very curious to hear about this!