Formula Validations and Messages

The Formula Editor highlights real-time formula validation with error banners. This table shows the validations performed:
Validation Rule When or What is Checked Validation Message (as shown in UI)
Empty Formula Formula is empty Formula cannot be empty.
Unbalanced Parentheses Parentheses are not balanced Formula has unbalanced parentheses.
Starts with Closing Parenthesis Formula starts with ) Formula cannot start with closing parenthesis.
Ends with Opening Parenthesis Formula ends with ( Formula cannot end with opening parenthesis.
Starts with Operator Formula starts with an operator Formula cannot start with an operator.
Ends with Operator Formula ends with an operator Formula cannot end with an operator.
Consecutive Operators Two operators appear in a row without anything in between Formula cannot have consecutive operators.
Missing Operator Between Operands No operator between two operands Missing operator between operands.
Division by Zero Division by zero detected Division by zero is not allowed.
Numeric Values Only Formula contains only numbers (no metric/attribute) Formulas cannot have only numeric values.
At Least One Cycle Time (Cycle Time Result Type) Result type is Cycle Time, but no cycle time metric is present Formula of type cycle time must have at least one cycle time metric.
Date Difference: Odd Number of Timestamps, Not Paired, or Wrong Operator Date difference formula does not have even number of timestamps, or not paired with minus, or not bracketed To calculate a date difference, you must have an even number of timestamp attributes, separated in pairs, with a minus operator (-) between pairs and each pair enclosed in brackets.
Date Difference: Additional Elements Inside Pair Additional elements (constants, attributes, or operations) are inside a timestamp pair Additional elements (constants, other attributes, or operations) are only allowed outside the brackets enclosing a timestamp pair.
Attributes in Ratio Result Type Attribute is used in a Ratio formula Attributes cannot be used in ratio result types.
Ratio Must Include Divide Operator Ratio result type formula does not include / Ratio result types must include at least one / (divide) operator.
Formula Contains Syntax Error General syntax error Formula contains a syntax error.
Formula Uses Invalid Data Type Formula uses an invalid data type Formula uses invalid data types.
Formulas Cannot Reference Other Formulas Formula metric is referenced inside another formula Formulas cannot reference other formulas.
Invalid Rate and Cycle Time Combination Rate and cycle time are used incorrectly Invalid Rate and Cycle Time combination.

Formula Editor Widget Integration

  • Single Metric Widget:
    • Cycle Time: Aggregation options (AVG, MIN, MAX)
    • Number: Aggregation options (SUM, COUNT, AVG, MIN, MAX)
    • Ratio: Aggregation is fixed to RATIO
  • Chart Widget:
    • Same aggregation and display logic as single metric widget
  • Display of Null and Zero Values:
    • 0 is included in calculations and shown as 0 or 0%
    • Null values are shown as No Data or omitted

How the formula components (chips) work

  • Selection
    • When you add a metric, attribute, number, or operator, it appears as a chip in the formula editor.
  • Editing
    • To remove a part of the formula, click the x icon that is shown when you hover over a chip.
    • To directly edit a numeric chip, click it.
    • To rearrange chips, drag and drop them to a new position in the formula.
  • Grouping
    • To visually group parts of the formula, use parentheses. The parentheses are also shown as chips.
  • Validation
    • The editor verifies the chip arrangement in real time. If an operator is missing or the sequence is invalid, an error message is displayed. You cannot save the configuration until you correct the error.