Hello,
I am building a form- a methodology to assess farmers’ practices we want to launch on KoboToolbox- and I have some questions that are straightforward (with numbers, range and “select many” question type) and no problem with them. Instead, a couple of questions need to be the average mean of “subquestions” (1-5 points, with a range of 0.5 each). One has two subquestions, the other one has 12 subquestions. My first issue is that I cannot find a mean (average) type among the “calculate” questions. My second issue is that the 2 and 12 questions, respectively, are not all compulsory (as they may refer to some topics that a farmer is not specifically involved into), so my question is how to actually create a calculate question with only the questions actually answered.
The final result should be to have only one point for the two questions.
Many thanks
Stella
Take a look at the following form; it is hopefully apparent how to adapt it to an arbitrary fixed number of questions. The trick is to calculate the number of non-null questions answered (num), and then add them all up (total), ensuring any non-answered questions are zero, by using the coalesce() function. Then simply divide the two to get the mean.
aiYdo8Q5rWYVZ3pRnFaEWq.xlsx (5.9 KB)
BTW, if you have an indeterminate number of questions, ie a repeat group, then you can also accomplish similar, but it’ll look quite different.
1 Like
Thanks! Will take a look soon



