...
Go to 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):
`Name`, `Slug`, `Unit of measurement` (e.g. USD, kg, days), `Decimal places`, `Is currency` (if it is a currency value)
`Type`: Numeric (for this example)
`Schema`: Kpi
`Script` structure of the returned result needs to follow:
Code Block return { result: { techSlug: 'FDM', value: 100.20, percentage: 1, }, }
the provided example script has hardcoded values for
techSlug
,value
andpercentage
, whereas in real setups the value and percentage can come from other calculations based on other scores or helper functions
...
Go to Admin panel > AMPI > Report Charts
Add a new chart, fill the following and save:
`Name`, `Description`, `Sort priority`
Make sure to check `Is enabled` and do not select anything in `Report`
`Type`: KPI
Under `REPORT CHART SCORES`, select only 1 score, following the setup and result structure described above in https://3yourmind.atlassian.net/wiki/spaces/PD/pages/1881342011/KPI+card+configuration#Configuring-a-custom-KPI-score
...