Create Indicator with complex filter Expression

Hi Team Members,
I use DHIS2 to Manage our project Data (Collect, Analysis and visualization). I want to create an Indicator to track the ““Number of Group’s Lead Position Held by Youth””. For Each Group, I gave in my DHIS2 application (database) the nominative list of Group’s members with their Position (President, Treasure, Secretary,…).

Job is already done ::

  1. I created Indicator with Aggregate type=Count and analytics Type=Event
  2. In expression section I put : V{event_count}
  3. In Edit filter Section : I put this expression – ((({eRlIP6pVcxW.VzZjDFG61tr} == ‘15-29’ && #{eTGFYU6pVcxW.PskJHxLUYhx}==‘President’ )))

All issues from this section (Edit Filter). I can not create a Filter using &&. If I keep only the first expression, the value of Indicator is calculed but this result is not correct. Because, it is not all member (youth) 15-29 years occuped Lead position. so, If I add the second expression with &&(And), DHIS2 valided the expression but the Indicator’s result is empty. After check in my Data base, I have Youth(15-29 years) who occuped “President” Position in some groups. So, does not be empty.

Mys question : How can I create “Filter Expression” by using ||(OR) and &&(AND) with some fields ?

1 Like

Hi team members,
finally, after more try I found the expression whilch solve my issue.
The expression is :
(#{eRlIP6pVcxW.PskJHxLUYhx}==‘president’ and #{eRlIP6pVcxW.VzZjXcM61tr}==‘15-29’)

thanks and See you

2 Likes