Formula syntax, examples, and tags
- Last UpdatedSep 25, 2023
- 2 minute read
Formulas use simple algebra-style equations and generic tags. When you link a formula to a KPI in a Metrics reporting point, link the tags to data fields or sources to give them meaning in the context of that particular KPI in a location in the plant hierarchy.
Formulas use four simple arithmetic operators; plus (+), minus (-), multiply (x) and divide (/).
Each formula can be used by multiple KPIs and each KPI defines the data fields or values to use for the particular instance of the KPI.
Note:Formulas can use other formulas as part of their expressions.
Example formulas
|
Formula Name |
Expression |
Resolvers |
|---|---|---|
|
OEE |
Availability * Performance * Quality |
The expression references other formulas, so there are no resolvers in this expression. |
|
Availability |
(CalendarTime - RealDowntime) / CalendarTime |
The resolver is RealDowntime. CalendarTime is a predefined formula, so it does not have to be resolved. |
|
Performance |
Actual Production / Target Production |
The resolvers are Actual Production and Target Production |
|
Quality |
.9 |
The expression holds a numeric value, so there are no resolvers in this expression. |
|
Production Rate |
Quantity / Hours |
The resolvers are Quantity and Hours. |
Predefined formula tags
CalendarTime is a predefined formula tag that does not require a resolver. Instead, AVEVA™ Production Management automatically counts the elapsed seconds since the start of the current time period and supplies that value to the KPI. This field does not get updated automatically.
Note: CalendarTime does not trigger KPI updates.
For example, a formula could be Quantity / CalendarTime. This formula would result in the rate per second. Quantity / CalendarTime * 3600 would result in the rate per hour.
Note: The length of the time period is defined by the KPI with this formula.