Key Performance Indicators, or KPIs, are loved by businesses, which means XAF has to love them because our target market is developers working in teams who have been side tracked to build “that little app” for accounts; and we know, the faster you can get that done, the faster you can get back to your “proper” day job. So it’s great news then, that as of Vol 2, XAF will ship with a KPI module!
So what are KPIs? Well, these are quantitative measurements of dynamic business processes. For instance, an important performance indicator for a trading company is daily sales, for a developer team – the number of active bugs in their product, etc. For better visualization, KPI value ranges can be split to a “green zone” (everything is OK), “yellow zone” (warning), and “red zone” (things are bad). When the KPI is based on a time range, it can be useful to compare values of different periods (for instance, the current month against the previous one). If a deeper analysis (drilldown) is required, then the objects an indicator was calculated from can be listed.
It’s probably easier if I just show you:
When the KPI module is used in an XAF application, the “KPI” navigation group with the “Definition” and “Scorecard” navigation items is available:
Under the “Definition” item, a new KPI definition, represented by the KpiDefinition persistent object, can be created.
The KpiDefinition object’s properties are described below:
• Name – the KPI’s name.
• TargetObjectType – the type of object KPI is designed for.
• Criteria – criteria used to filter a set of objects to analyze. In KPI criteria, two extra parameters for DateTime properties can be used – RangeStart and RangeEnd. These parameters represent a measurement range specified by the Range property.
• Direction – “High is better”/”Low is better” enumeration value, specifying how to treat deviation from a previous measurement result.
• Expression – aggregation function used to evaluate KPI – Sum, Count, Avg, etc.
• Range – the period to analyze.
• Compare – the Boolean flag, which indicates if the KPI current values should be compared to previous values calculated using the RangeToCompare period.
• RangeToCompare – the past period compared with Range.
• MeasurementFrequency – the time span between measurements.
• GreenZone , RedZone – specifies KPI value ranges used for visualization.
In the Preview tab, the current KPI value and a collection of objects, used to calculate KPI, are available.
The best place to view the KPI results is the dashboard. Here, we will take a look at the Scorecards. A Scorecard is an object, exposing a collection of KPIs. Under the Scorecard navigation item, the Scorecards with linked KPIs can be created.
A drill-down list view can be invoked by double-clicking a KPI. It is a list of objects that were used to calculate the KPI result. This list view can be analyzed by grouping and sorting data, or by using our new features – ChartListEditor or PivotGridListEditor, representing this collection as a Chart or a PivotGrid:
To visualize KPIs on the scorecard or dashboard, the KpiInstance objects are used. KpiInstance is separated from the KpiDefinition. The KpiInstance object holds and manages KPI measurement history, retrieves Current and Previous values from the KPI history cache, creates a data source for sparkline and chart editors, and is responsible for cleaning outdated values from the cache. A KpiInstance object is created by a KpiDefinition object in its AfterConstruction method.
The ShowChart Action provides the capability to view KPI results as a chart:
The chart is customizable via the Chart Wizard, and can be printed – just like charts created with the PivotChart module.
The ability to visualize KPIs via the Gauges is currently in development.
That’s all for this post, ‘til next time, happy XAFing! :-)