Boolean aggregation type

Hello everyone,

I want to confirm the proper aggregation type for the boolean data value value type, specifically within a dataset. Currently, these data elements are configured as count with the idea that false values will be 0 and only true values will be 1 and will be aggregated as such as well. However, all values count as 1 and this result in an inaccurate report. Changing the aggregation types to sum corrects this issue, however is the count data aggregation type supposed to work like this?

Any confirmations or/and contributions will be appreciated.

Thank you in advance.

1 Like

It depends on what you want as output of this data element and on which domain (tracker or aggregate) you are using it.

If you are using it on aggregate domain and you are interested in aggregate YES response, sum is the right aggregation type.

If you are using it on tracker domain and still you are interested in aggregating YES response, again sum is the right aggregation type but if you are interested in aggregating both (yes/no) response then its better you chose Count as aggregation type.

How operates:

  1. Sum aggregation type: sums only true values.
  2. Count aggregation type: counts both (yes/no)

I hope you find the explanation useful.
Good luck

3 Likes

@LutfullahShifaa this is definitely helpful. Thank you :pray:.

cc: @Namename

2 Likes

Thanks @LutfullahShifaa!

2 Likes