Generic filters
Exact matches only

Using KPI Attribute Functions & Formulas

KPI Attribute functions and formulas use equations and references in a KPI attribute’s definition, allowing the KPI attribute value to be calculated at run-time.

An attribute can contain values, mathematical operators, and references to other values. Two types of references can be used in KPI attribute functions and formulas: Direct and Indirect.

Direct References

A Direct Reference is a reference to a tag name that defines the location of a real-time value in an underlying system, such as SQL Server or PI. Direct references can be used in any KPI attribute with a matching Interface column, such as Low, High High, or InService.

When you use a direct reference in an attribute calculation, you must also define the attribute’s Interface. This allows the KPI Server to retrieve the referenced tag’s value from the correct external system.

Note: For KPI attributes that include an attribute formula or function with multiple direct references, the KPI attribute cannot be trended.

Indirect References

An Indirect Reference is a reference, by column name, to a value in another column in the same KPI, such as Target, Low Low, or Actual. KPI attribute functions and formulas that include an indirect reference are referred to as “Alias Calculations.” The term “Alias” refers to the column header of the referenced KPI attribute, such as Low, High High, or Target.

Indirect references can only be used in the following KPI attribute definitions: Low Low, Low, Target, Actual, High, and High High.

When you use an Indirect Reference, do not specify the attribute’s Interface; references to an Interface in an Indirect Reference will be ignored.

Note: Functions and formulas can also be used within an Ad Hoc Trend, using the Lookup field. Learn more

Supported Operations

KPI attribute functions and formulas can include the following operations:

  • Add, subtract, multiply, divide any direct reference value by a constant

  • Add, subtract, multiply, divide any direct reference value by any other direct reference value from the same system

  • Add, subtract, multiply, divide by another indirect reference value in the same KPI

  • Make the direct reference value of one KPI attribute a function of the other KPI attributes in the same KPI

  • Use any of the built-in KPI functions: Date, Logical, Lookup, and Text functions. Learn more

  • Combine any of the above operations

Building Attribute Functions and Formulas

KPI attribute functions and formulas must be composed in a specific manner in order for Visual KPI Server to recognize it as a calculation.

  • Angle brackets “< >” must enclose the entire calculation.
  • You can use parentheses “( )” to enclose portions of the calculation, which ensures that the enclosed portion of the equation is performed independently of the balance of the equation.
  • Square brackets “[ ]” must enclose individual tag names and/or aliases.

Examples of KPI Attribute Functions and Formulas

  • Direct Reference: A KPI’s Target value is defined as TagA in SystemZ. On SystemX there is a tag named TE_DPsM3. The KPI’s Low attribute is defined as <[TE_DPsM3]/2>. The KPI’s Low Interface is defined as SystemX. When you preview the scorecard, the KPI’s Low attribute will be calculated by dividing the value of the tag TE_DPsM3 by 2.

  • Indirect Reference: A KPI’s Target value is defined as TagA in SystemZ. The KPI’s Low attribute is defined as <[target]-20>. The KPI’s Low Interface does not need to be defined; any entry in the KPI’s Low Interface column is ignored. When you preview the scorecard, the KPI’s Low attribute will be calculated by subtracting 20 from the current Target value.

  • Direct and Indirect References: A KPI’s Target value is defined as TagA in SystemZ. On SystemX there is a tag named TE_DPsM3. The KPI’s Low attribute is defined as <[target]+[TE_DPsM3]>. The KPI’s Low Interface is defined as SystemX. When you preview the scorecard, the KPI’s Low attribute will be calculated by adding the value of the tag TE_DPsM3 to the current Target value.

Was this article helpful?

Related Articles