Detect indicators with no scores in a formula
As the formula creator, you can handle contributing indicators that have null scores. First set the formula indicator to calculate the formula even when it contains a null score.
Before you begin
About this task
Procedure
- Open the formula indicator of interest.
- Select Allow formula component to be null.
-
In the Formula, add an
if{} else {}statement that ascribes a value to an indicator when it has no score.
Field indicator with Allow formula component to be null
Consider the following formula indicators for a collection period when there are no closed incidents, so the indicator Number of closed incidents has no score.
Formula
1:
[[Number of open incidents]] / [[Number of closed incidents]]Formula 2:
[[Formula 1]] + 23Formula 3:
if ([[Formula 1]] == null) { 23 } else { 11 }Formula 4:
[[Formula 2]] || 64Formula
5:
(([[Formula 1]] == null && [[Formula 2]] == null) ? 11 : 18)If Allow formula component to be null is not selected for any of the formula indicators, none of them have scores.
If Allow formula component to be null is selected for all of
the formula indicators, they have the following scores:
- Formula 1 = null
- Formula 2 = 23
- Formula 3 = 23
- Formula 4 = 64
- Formula 5 = 11
Formula 2, Formula 3, Formula 4, and Formula 5 represent four different ways to handle the null score.