Use Logic Checks

On this page:

What is a logic check?

Logic checks allow you to flag indicator results that fail common-sense comparisons to numbers, 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 trainees should be under 1,000. 
  • 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.

When logic checks are calculated, any data that does not meet the statement you define in the logic check will throw a warning violation.

Create a logic check

Go to Tools > Logic Checks.

Click on the + New Logic Check button in the lower right corner.

This will open a Create New Logic Check pop-up. Give your logic check a name and click the + Create Logic Check button.

In the left and right boxes in the Definition section, add the indicators, values, or expressions you'd like to compare. To reference an indicator, put its code in square brackets like [this], e.g. [3.1-N]. 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.

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:

Referencing Disaggregations: If you want the logic check calculation to compare categories for an indicator's disaggregation, use a vertical bar (i.e. pipe operator: |) after the code within the bracket. For example, male children would be written as [3.1-N|Male]. You can also reference multiple disaggregations if your indicator is cross-disaggregated, such as [3.1-N|Male|Rural].

Algebraic Expressions: In the definition boxes, you can add algebraic expressions. For example, you might create the logic check [3.1-D] > [3.1-N]*4. This logic check means that you expect the total number of children surveyed to be more than four times the number of children reported as sleeping under nets.

Multiple Indicators: You can also use multiple indicators in a definition box. So we might have [3.1-D] = [3.1-N] + [3.2], if 3.2 collects the number of children reported as having not slept under a net.

Imagine a scenario where you want to check for gender disparities in your survey sample. You want to flag any results where the total male children surveyed is over 100 more than the total female children surveyed. That definition would 1) use an expression with more than one indicator, 2) reference indicator disaggregations, and 3) compare to a fixed value. 

View warnings

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, or you can immediately run the logic checks by clicking on the Run Logic Check button. 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.

Reporting period pages for each activity show that activity's indicators and data for that period. Any logic check violations will be tallied in the Warnings column. Warnings are given for any indicators involved in the logic check on either side of the operator.

When you click on an indicator with a warning, you can see the details of the warning in a pop-up by clicking on the warning icon.

When do logic checks run?

Logic checks are re-run automatically system-wide every 15 minutes. 

You can also click the Recalculate logic checks button to manually recalculate them at any time from the logic check definition page:

Or the activity's reporting period page:

Or from the data entry page for the indicator:

Do logic check warnings prevent submission of indicator data?

Logic checks can be used to flag incorrect data, but they can also be used to flag unexpected or undesirable outcomes that are nonetheless correct. For this reason, logic check warnings do not prevent the submission of data. Logic check warnings are intended to assist reviewers in assessing data prior to approval.

How do I resolve a logic check?

When you view warnings and see that some data violates a logic check, examine the data to identify whether 1) there is an error with the data or whether 2) the data is correct and the warning indicates the need for a programmatic shift. If there is an error with the data, edit the indicator results to correct the data it or return the data to a partner to correct. Once corrected, the warning remains until the logic checks are recalculated automatically (which happens every 15 min) or manually, by clicking the Recalculate logic checks button. 

Didn't answer your question? Please email us at help@devresults.com.