Troubleshooting a Calculated Indicator

Using advanced calculation features can increase the likelihood that errors will occur when defining calculations. For example, a single typographical error in the calculation string for a descriptive indicator could result in an undefined value for the indicator.
If a calculation produces an undefined value, the system displays a message and produces an indicator reading. This reading is flagged as invalid (that is, incorrect) and does not appear in graphs, and so on. The indicator’s last valid reading remains its “current” reading.
As with normal calculated readings, you can look at the values for each of the inputs that were used in the calculation, which should help you to determine the source of the error (for example, divide by zero, unexpected value, typographical error, and so on).

Calculation Failures

The following lists various causes for calculation failures. The system creates a reading and flags it as incorrect in each of these situations.
Divide by zero: This situation occurs when the calculation contains an input that is used in the calculation as a divisor and the current value of the input is equal to zero.
Null input: This situation occurs when one of the inputs in the calculation evaluates to null (no value). This can happen for several reasons, for example:
Note: You can tell the system to allow null values on individual calculation inputs. If you select to allow a null value in a calculation, you might want to account for this possibility in the VB.NET or C# script in your calculation.
Calculation string error: This situation occurs when the calculation string itself is flawed. This can happen, for instance, when the calculation expression contains Boolean logic that does not properly deal with every value that an input can have.
However, there are other situations in which a calculated indicator is prompted to recalculate, but the calculation does not occur:
Indicator’s asset is non-operational: If the asset that owns the calculated indicator is in a non-operational state, the indicator is not recalculated if a new reading is entered for one of its inputs and that input’s indicator belongs to a different asset. However, if the input’s indicator belongs to the same asset, the indicator is recalculated.
The reason for this difference in behavior is: In the first case, to prevent the unintentional recalculation of an indicator on a dormant piece of equipment. In the second case, the assumption is that if readings are intentionally being entered for other indicators on the same piece of equipment, then it’s reasonable to expect that the calculated indicator’s value should also be updated even though the equipment is not being used.
Inputs are outside the required proximity: This setting is only applicable when a calculation uses more than one indicator reading-based calculation input. This rule does not apply to filter-based calculation inputs. With required proximity, you can specify the length of time within which all readings must have been collected in order for APM to evaluate the rule or calculation. If any of the indicators fall outside of the required time period, APM does not evaluate the calculation.
These two situations are not considered calculation failures. Therefore, no reading is produced when they arise.

Test Value Errors

Each calculation input must have appropriate test values in order for the Check Expression method to work. For array inputs, you must enter the same number of test values as the number of expected values in the array. That is, if you expect five values, you must enter five test values. If an input does not have a test value, or has the incorrect number of test values, you may see an error similar to:
“Subscript out of range: ‘[number:0]]’”

To Review Incorrect Readings

1.
2.
Select the Readings view, and then the Readings tab. This tab shows the history of readings for this indicator.
3.
From the configuration list, select Incorrect Readings. This table lists any incorrect readings that were created for the indicator.
4.
5.
Select the Incorrect Reading tab. This tab shows the reason for the incorrect reading.
6.
Select the Calculation tab. This tab shows the calculation formula or function used to create the reading, as well as the values for each of the calculation inputs.
7.