> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding KPIs

> Guide to adding KPIs in Atoti Market Risk, covering reusable patterns for creating and exposing new key performance indicators with minimal changes to the application, extendable for any use case.

Adding a KPI to Atoti Market Risk follows the same extension pattern as other measure types. The patterns in this guide are generic and can be extended for any use case with minimal changes to the application.

| Cube | Qualifier |
| - | - |
| Var-ES Cube | kpiVaRESCube |
| VaR-ES Summary Cube | kpiVaRESSummaryCube |
| Sensitivity Cube | kpiSensitivityCube |
| Sensitivity Summary Cube | kpiSensitivitySummaryCube |
| PLCube | kpiPLCube |
| PL Summary Cube | kpiPLSummaryCube |
| Combined Cube | kpiMRCombinedCube |

A KPI can be defined as a bean with the following format:

```
        @Bean
        @Qualifier("kpi[...theCubeName...]")
        public IKpiDescription myKpiTest() {
        return StartBuilding.kpi()
            .withName(...)
            ...
            .build();
        }
```

Pre-defined KPIs for the VaR-ES cube are located in the class `KpiProviderConfig` within
`/mr-var-config/src/main/java/com/activeviam/mr/var/config/`

### Suggested Further Reading

* [Adding cube hierarchies](https://docs.activeviam.com/solutions/market-risk/6.0/dev/dev-extensions/add-a-new-cube-hierarchy.md)
* [Configuring measures using Spring Beans](https://docs.activeviam.com/solutions/market-risk/6.0/dev/dev-extensions/configure-measures.md)
* [Configuring schema selections using Spring Beans](https://docs.activeviam.com/solutions/market-risk/6.0/dev/dev-extensions/configure-schema-selections.md)
* [Configuring sources using Spring Beans](https://docs.activeviam.com/solutions/market-risk/6.0/dev/dev-extensions/configure-sources.md)
* [Adding data loading or unloading topics](https://docs.activeviam.com/solutions/market-risk/6.0/dev/dev-extensions/add-a-new-data-loading-unloading-topic.md)
