This article covers the capabilities and details of writing custom KPI definitions using Oden Query Language (OQL).
Overview
Oden computes a variety of industry standard KPIs, such as output, utilization, and OEE, right out of the box. However many customers have additional KPIs or special definitions they would like to track, so we also provide the ability to define your own custom KPIs.
These custom KPIs are written using components of the Oden Query Language, referred to as OQL.
Writing Expressions
Writing an expression is as simple as writing a math equation with a series of variables. Each variable to include is simply denoted as aggregation.[variable name].
For custom KPIs, the basic math operations of add / subtract / multiply / divide are currently supported with their typical characters of +, -, *, and /. Order of operations control is also supported using ().
Finally, constants can be added to expressions anywhere a variable can.
Example expression types are shown below, but note that these variable names are not valid input, and currently supported variables are covered below.
aggregation.x + aggregation.y
aggregation.x / (aggregation.x + aggregation.y)
1 - aggregation.x
Note that both the aggregation keyword and variable name are all lower case
Expression Variables
Currently, custom KPIs supports writing expressions using the standard Oden KPIs as variables . The standard KPIs are listed in the table below with a brief description.
Note: A bug causing certain queries to fail and break all values on the now page has been fixed as of July 27th. If you saw this type of issue prior to that date, your desired expression should now work.
| Name | Description |
| output | Total amount of production output based on designated machine data source |
| yield | Total amount of sellable production reported from business system, such as ERP or MES. (Note: Not available if that integration is not configured) |
| scrap | Total amount of non-sellable production reported from business system, such as ERP or MES. (Note: Not available if that integration is not configured) |
| utilization | Total uptime hours divided by total hours in period |
| availability | Total uptime hours divided by total hours in period after removing periods categorized with a planned downtime reason |
| performance | Average production rate divided by target or standard production rate of relevant product |
| quality |
Total yield divided by total output, effectively representing rate of production output that was reported as sellable (Note: This measure is only available if your factory provides reported yield.) |
| oee |
Availability times performance times quality, equivalent to sellable production reported divided by (target production rate time * available hours). Note: If your factory is not providing reported yield, this will just be availability time performance. |
Common Expressions
Here are some example expressions that are commonly used:
Scrap Rate:
This expression will provide the rate of scrap as reported into your ERP/MES system. version 1 compares to yield reported into that system, while version 2 compares to output measured on the machine.
version 1: aggregation.scrap / (aggregation.scrap + aggregation.yield)
version 2: aggregation.scrap / aggregation.output
Targeted Production:
This expression will provide the amount of output that would have been generated if your line had been running for all available hours at targeted rate. You can also multiply by a scaling factor, say 0.9, if you want to present a more achievable number.
aggregation.output / (aggregation.availability*aggregation.performance)
Performance Loss:
This will show how much output has been lost in the period due to the line running below standard rate. A positive number would indicate lost output and a negative number gained output due to running above standard. The expression could also be reversed to indicate negative as lost output and positive as gained.
(aggregation.output / aggregation.performance) - aggregation.output
Live OEE:
Since the OEE component of quality is typically based on delayed reporting of output as either scrap or sellable product into an ERP/MES, the standard OEE measure is often understated or noisy based on reporting frequency. These expressions provide options for better indicating process efficiency in real time, the best one generally depends on how frequently scrap and good production are reported.
version 1: aggregation.availability * aggregation.performance
version 2: aggregation.availability * aggregation.performance * (aggregation.yield / (aggregation.scrap + aggregation.yield))
version 3: aggregation.availability * aggregation.performance * ((aggregation.output - aggregation.scrap) / aggregation.output)
Supported Areas of Platform and User Access
At this time, custom KPI's are only supported on the Oden Now Factory Overview page. All users will be able to configure KPIs, or to import as a part of a Now Configuration File someone else created.
We are working to expand coverage and plan access in more areas of the platform in Q3 2022.