Org units count in a dataset data element

How do I create a dhis2 indicator that calculate the number of Org units with more 10 peaople trained in monitoring. We have a data element “peaople trained in monitoring” which is a zero or positive integers and its attached to a data set.

Mohammed

Predictors helps in this situation.

1. Create an Output Data Element

  • Navigate to Maintenance > Data Elements.
  • Create a new Data Element (e.g., Org units with >=10 trained).
    • Value type: Integer
    • Aggregation type: Sum
    • Domain type: Aggregate
  • This DE will store the result of the predictor (either 0 or 1 per org unit).

2. Create a Predictor

  • Go to Maintenance > Other > Predictor.
  • Click + New to create a new predictor.
Predictor Configuration:
  • Name: e.g., Org units with >=10 people trained in monitoring
  • Output Data Element: Select the DE you just created (Org units with >=10 trained).
  • Organisation Unit Level: Choose the level where the input DE is reported (e.g., health facility or district).
  • Period Type: Use the same period type as the dataset (e.g., monthly, quarterly).

3. Define Generator Expression

  • In the Generator expression, input the logic to check if the DE value is ≥ 10:
if( #{people_trained_DE_ID} >= 10, 1, 0 )

Replace #{people_trained_DE_ID} with the actual UID of the “people trained in monitoring” data element.

  • This logic says:
    • If the DE value is 10 or more, return 1 (mark this org unit as meeting the threshold).
    • If not, return 0.
1 Like

Hi @abdimohammed

Thank you for sharing the detailed solution. Your post will help other community members. :tada: