I’m trying to develop a form that shows in a repeat group how many responses below 16 and below 15. Readings are sugar in fruit so can be as much as I can take from a sample.
My intention is to get the % of values from the total universe of readings.<16 and <15.
The repeat_group name is “sugars”
I’m using count({sugars}) to get the n° of repetitions so I can get the % but I’m very struggled with the formula to get the n° of readings <16 and <15.
I have tried something like count({sugars})<16 but is not working.
I have also tried relevance, constrain without any sucess.
I would be very greatfull if anyone knows how to solve this issue.
It’s an If condition similar to the one you use in Excel. Here, when using if(expression, then, else), returns then if expression evaluates to True. Otherwise, returns else.
Simplifying it further, ${brix}<16 is your expression where you are trying to provide a value 1 if the variable ${brix} is less than 16. If and in case, this condition does not satisfy, it will select a value 0.
Would you mind having a look at the support article Advanced Use of Calculate Questions. It should provide you with more examples on how to use the advanced calculations in KoBoToolbox.