KPI in JQuery PivotGrid widget

13 Feb 20194 minutes to read

Key Performance Indicators (KPI) are business metrics that help you to figure out the progress of an enterprise when meeting its business goals.

The different indicators available in the KPI are:

  • KPI value: A physical measure or a calculated measure.
  • KPI goal: Defines the target for the measure.
  • KPI status: Evaluates the current status of the value compared to the goal.
  • KPI trend: Evaluates the current trend of the value compared to the goal.

The “KpiElements” class in the OLAP base library holds the KPI name, and when its object is added to an OlapReport, you can view the resultant information in the PivotGrid.

Client mode

  • JS
  • <!--Create a tag which acts as a container for PivotGrid-->
     <div id="PivotGrid1" style="height: 350px; width: 100%; overflow: auto"></div>
    <script type="text/javascript">
        $(function() {
                dataSource: {
                    data: "",
                    catalog: "Adventure Works DW 2008 SE",
                    cube: "Adventure Works",
                    rows: [{
                        fieldName: "[Date].[Fiscal]"
                    }, ],
                    columns: [{
                        fieldName: "[Product].[Product Categories]"
                    values: [{
                        measures: [{
                            fieldName: "[Measures].[Internet Sales Amount]"
                        }, {
                            fieldName: "[Measures].[Growth in Customer Base Trend]"
                        axis: ej.olap.AxisName.Column

    Key Performance indicator, aka KPI support in JavaScript pivot grid client mode

    Server mode

  • C#
  • OlapReport olapReport = new OlapReport();
    olapReport.Name = "Sample Report";
    olapReport.CurrentCubeName = "Adventure Works";
    MeasureElements measureElementColumn = new MeasureElements();
    measureElementColumn.Elements.Add(new MeasureElement {
        Name = "Gross Profit"
    DimensionElement dimensionElementRow = new DimensionElement();
    dimensionElementRow.Name = "Date";
    dimensionElementRow.AddLevel("Fiscal", "Fiscal Year");
    KpiElements kpiElement = new KpiElements();
    kpiElement.Elements.Add(new KpiElement {
        Name = "Revenue", ShowKPIStatus = true, ShowKPIGoal = false, ShowKPITrend = true, ShowKPIValue = true

    Key Performance indicator, aka KPI support in JavaScript pivot grid server mode