Logic checks allow you to flag indicator results that fail common-sense comparisons to other indicators or other disaggregations. You can design your own logic checks in DevResults based on your indicators and view any data that violates these rules. Examples of logic checks include:
- Number of administrators should be greater than or equal to the number of administrators who were trained.
- Doctors + nurses should be less than or equal to the total number of medical professionals.
- Metric tons of corn produced should be less than 40% of total metric tons of crops produced.
For this example we will use "number of students should be larger than the number of teachers."
Go to Results > Logic Checks.
Click on the + New Logic Check button in the lower right corner:
This will open a New Logic Check pop-up:
Give your Logic Check a name and click the + Create Logic Check button.
There are three required steps for defining logic.
- Logic checks compare two or more indicator results or disaggregations. In the first definition box, list the code for the first indicator or disaggregation. Put the code in square brackets like
[this]. When you click outside the editing box, the system will confirm that it recognizes your indicator code or it will give you an error that it does not recognize your indicator code. Correct the code as needed.
- In the second definition box, list the code for the indicator or disaggregation that will be compared, also in square brackets like
- Between the two boxes, select the desired operator for your comparison. The options are:
- = (equal to)
- >= (greater than or equal to)
- > (greater than)
- <= (less than or equal to)
- < (less than)
- <> (not equal to)
You have the option to add a note about this Logic Check in the Notes box. Use this as an explanation for other users so that if they have data that violates the logic check, they have an understanding of what needs to be fixed.
Here's a sample of what the above would look like:
Codes for Disaggregations: If you want the logic check calculation to compare values for an indicator's disaggregation, use a vertical bar "|" after the code within the bracket. For example, male students would be written as
[S-02|Male]. You can also reference multiple disaggregations if your indicator is cross-disaggregated, such as
So if we wanted to make a logic check that only looked at the number of female students compared to the number of female teachers, it would look like this:
Once the logic check is created, you can run it immediately using the Run logic check button in the lower right. Logic checks are run automatically every 15 minutes.
The Warnings section will show any indicator performance data that does not meet the Logic Check's criteria, listed by activity. You can view these by reporting period using the Reporting Period dropdown.
Algebraic Expressions: In the definition boxes, you can add algebraic expressions. For example, you might create the logic check [S-02] > [S-01]*4. This logic check means that there should be more than four times the number of students as teachers.
Multiple Indicators: You can also use multiple indicators in a definition box. For example, [S-01] + [S-02] + [S-03] = [S-04] might mean that the number of teachers plus students plus administrators (S-03) should equal the number of individuals served at a school (S-04).
When you go to Results > Reporting Periods > (select reporting period) > (select activity) [or Activities > (select activity) > (select reporting period)], you will see all of that activity's indicators and any data reported so far for that reporting period. Click Recalculate logic checks to refresh the logic checks. Any logic check violations will be flagged in the Errors column:
When do logic checks run?
Logic checks are re-run automatically system-wide every 15 minutes. You can click the Recalculate logic checks button to manually recalculate them at any time, too.