Count events where date or text response is blank


I want a count of the events where a date OR text response was not recorded.

I tried using the following formats:

d2:hasValue(#{A0987654321.B0987654321}) != true

d2:hasValue(#{A0987654321.B0987654321}) == false

And aggregation was set to count. Neither of these worked for me. Is there a way to configure an expression similar to number data element expressions, but for dates and text ?

Can you try this

Dear @berhard

Sorry about this,

  1. Ensure the data element is of date type
  2. Hope this is not the report date on the event, otherwise you must have an event created and what you are filtering is a data element in an event or attribute
  3. You can also use !d2:hasValue(#{A0987654321.B0987654321})


Hi @asacur and @prosper,

Thank you for your expertise. The issue is now resolved.

1 Like

Hi @asacur and @prosper,

Iā€™m wondering if you can help me with one last thing related to event program indicators. If I use the filter above, and I collect, for example, four events at a facility in a month, and evaluate the data by month, I would see a value of four. Is there a way to change the calculation so that I only see the latest value for an organisation unit for a time period?

I.e., if I evaluated 10 facilities 2 times each in a month, I want the denominator to be 10 and the numerator to be the 10 most recent times I visited each facility.