Indicator having data element of value type boolen(YES/NO) given an indicator expression error

When creating indicator that uses data element of value type Boolean(Yes/No) indicator expression gives an error “Expression is not well formed” so this has disturbed the previous created indicator which were using those kind of data element and yet does not provide analytical results when using analytical tools
I have replicated the same bug in play demo instances

You’re immediate help will be appreciated as it has affected much a lot of those kind of indicator

@tuzoengelbert, thank you for your post! I see you’ve already created a Jira bug issue: https://jira.dhis2.org/browse/DHIS2-13227

I am able to reproduce this issue on DHIS 2 Demo - Sierra Leone and will be asking for further support. Thank you! :+1:

@tuzoengelbert This is a problem caused by a new feature in 2.36, but it can be fixed.

It used to be that only numeric data elements could be used in validation rule and predictor expressions, because all data elements (and other dimensional items) were assumed to return numbers. This changed in 2.36 so the data type of the data element (and others) is honored, and you can now use boolean or even string values in validation rules and predictors. This applied to indicators as well, except that it seems to break a feature you were using if I am understanding correctly. With indicators, since booleans are stored as a number 0 or 1, and since they are aggregated before the indicator expression is evaluated, they can can be summed, and hence they will return to an indicator expression the count of the true values present in the database.

I will fix this so indicators will assume that boolean data elements are aggregated into a numeric value before they are evaluated in the expression — so booleans within indicators for 2.36 and following will work the same way they did before.

1 Like