Count number of options of a certain type in select_one

Hello.

In my forms, I have several questions that follow the same pattern:

Question 1) Do you like dogs?
a) Yes
b) No

Question 2) Do you like cats?
a) Yes
b) No

Question 3) Do you like snakes?
a) Yes
b) No

And so on. I have fifteen or sixteen questions like that.

And then I have the following question:

Question 20) Are you a bad person?
a) Yes
b) No

I want question 20 to appear if the one selects b) five times in any of the previous questions. Like. If he or she selects b) in questions 1,2,3,4 and 5, or if he or she selects b) in questions 2,7,8,10 and 11, or if he or she selects b) in any possible combination of five questions.

Is this possible? How could I do that?
I am using ODK Collect v1.20.0.

Is it possible that you can share your excel form here?

You can achieve this by applying an if function() calculation to assign 1 to a question that is answered b else it will assign 0. You can continue this for all the questions with this pattern.
Then you can sum all the if calculation fields where a=0 and b=1 and it will return the total number of questions that were answered No. Please see the attached sample form as an example.

Regards,
Samson

sample.xlsx (9.3 KB)