Get count of DataElement of type yes/no

Using indicators or some other means, is it possible to get count of yes and count of no for aggregate DataElement of type yes/no?

Hi Zubair,

You can try with the following SQL View:

SELECT as dataElement,
p.iso as period, as orgUnit,
dv.value as value,
count (*) as total
FROM datavalue dv 
INNER  JOIN dataelement de on dv.dataelementid = de.dataelementid 
INNER JOIN _periodstructure p on dv.periodid = p.periodid
INNER JOIN organisationunit ou on dv.sourceid = ou.organisationunitid
WHERE de.valueType = 'BOOLEAN'
group by, p.iso,, dv.value

It groups result per DE, OU and Period.

Hi… Were you able to find a solution for the same?

Also @stratosilva Do you have a solution that includes the system itself doing a count of data elements of particular value e.g. yes/no OR other option sets OR data element isNull/isNotNull

Also do you know how the count aggregation type for aggregate data values works?