Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

Custom KPI cards can be configured and enabled via the admin panel starting with version 23.8.

KPI cards are visualised in the report of a part detail page in AMPI. They can be used to highlight important values resulting from the part assessment, to provide the user with a clear overview at a glance when they access the report.

...

Configuring a custom KPI score

KPI cards can be used to highlight the result of a single score on the part detail page in AMPI. In order to do so:

...

A KPI score can be created and setup in Admin panel > AMPI > Scores

...

Add a new score, fill the following and save (Remember to trigger score recalculation in the scores list page after all scores have been created):

...

as follow.

Name

Slug

Unit of measurement

(for non monetary values - e.g. kg, days),

...

, `Is currency` (for monetary values)

...

Decimal places

Type

Numeric (for this example)

  1. KPI cards can also be used to highlight scores of Type: Text, in which case the configured Unit of measurement and decimal places are ignored

  2. if type text is used the value property on the script needs to be of type string (e.g. value: 'a string')

    `Schema`

Schema: Kpi

  1. `Script` structure of the returned result needs to follow:

    1. Code Block
      return {
      	result: {
      		techSlug: 'fdm',
      		value: 100.20, 
      		percentage: 1,
      	},
      }

      the provided example script has hardcoded values for techSlug, value and percentage , whereas in real setups the value and percentage can come from other calculations based on other scores or helper functions

...

Info

Remember to trigger score recalculation in the scores list page after all scores have been created

Configuring a custom KPI card

Attribute

Function

Name

Will be displayed as KPI card header

Description

Will be shown as help text upon hover

Sort priority

Defines order of KPI cards, lower numbers get sorted first

Is enabled

Shows/Hides individual KPI card

Type

Defines how the report chart is rendered, choose type = KPI to visualize a report chart as a KPI card

...