Create a conditional KPI

A conditional API applies conditional logic based on the available attributes to filter the data returned by the metric. A conditional KPI Key Performance Indicator measures the result of an activity in an organisation so that you can compare it to operational or strategic goals and attempt to improve performance. is created by combining a specific metric with a defined condition using available Employee and Org attributes, such as Worker Type or Pay Rule.

For example, a customer may want to compare Overtime Hours attributed to Part-time Employees against those attributed to Full-time employees across the stores in a particular district. The KPI formulas would look like:

Part-time Overtime Hours = [Overtime Hours] WHERE [Employee.Worker Type = "Part-time"]

Full-time Overtime Hours = [Overtime Hours] WHERE [Employee.Worker Type = "Full-time"]

Given the following data:

Location Type - Store Part-time Overtime Hours Full-time Overtime Hours
Store A 335 215
Store B 111 177
Store C 180 230
Store D 255 352

The customer could take the newly created metrics Measures and tracks workforce performance by comparing planned with actual workload or coverage, or by showing variances at any organizational level. and create additional KPIs, such as Part-time Overtime Hours as a % of All Actual Hours and Part-time Overtime Hours as a % of Part-time Actual Hours.

The KPI Builder supports a number of conditional KPI types, including:

Restrictions

  • A maximum of three conditions is supported in a conditional KPI. They can be any combination of Employee and Organization attributes.
  • You cannot apply conditions to another KPI within a KPI definition (for example, [KPI1]/([KPI2] WHERE [Employee Worker Type = "Part-time"])

Notes

  • For proper behavior, you should place conditions only at the end of the KPI formula's components. For example:
  • SM<PAID_HRS> / SM<PAID_HRS> {[Pay Rule - Name]=[AGENCY]}
  • If you place conditions within the KPI formula's components (for example, SM<PAID_HRS> {[Pay Rule - Name]=[AGENCY]} / SM<PAID_HRS>), the condition is erroneously applied to both metrics and the computed value of the KPI will not be accurate.
  • You must specify the complete organizational path, without double-quotes, where necessary in the formula of a condition. For example:
  • SM<PAID_HRS> {[Primary Account - Primary Job]=[Site/Facility/State/County/District/Town/Store1] OR [Primary Account - Primary Job]=[Site/Facility/State/County/District/Town/Store2] OR [Site/Facility/State/County/District/Town/Store3]}
  • The following would be incorrecrt:
  • SM<PAID_HRS> {[Primary Account - Primary Job]=["Store1"] OR [Primary Account - Primary Job]=["Store2"] OR [Primary Account - Primary Job]= ["Store3"]}