> ## 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.

# Add custom measure configuration

> How to add custom measures to the Atoti Limits cube configuration by implementing the IMeasureBuilder interface, defining a CustomMeasureBuilder Spring Configuration class, and importing it via LimitsAppConfig

## Overview

This section explains how to customize the cube’s measures configuration by implementing the `IMeasureBuilder` interface and importing the Spring Bean into the project.

### IMeasureBuilder interface

This interface contains a single method, `copperMeasures()`, which, when implemented, will contain all new copper measures that will be added to the cube’s configuration.

```java theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
/**
 * <b>IMeasureBuilder</b>
 *
 * <p>Interface to define copper measures.
 *
 * @author ActiveViam
 */
public interface IMeasureBuilder {
  void copperMeasures(ICopperContext context);
}
```

### CustomMeasureBuilder class

To add new measures to the cube configuration, define a Spring Configuration class, which implements the `IMeasureBuilder` interface. Within the `copperMeasures(ICopperContext context)` method, add the new copper measures.

See example below:

```java theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
@Configuration
public class CustomMeasureBuilder implements IMeasureBuilder {

  @Override
  public void copperMeasures(final ICopperContext context) {
      Copper.count().withAlias("NEW COUNT").publish(context);
  }

}
```

All measures defined in `copperMeasures()` are added to the cube’s configuration along with the default measures.

### Import the Spring Bean

Once the bean is created, import it into the project. See [Importing Spring Beans into the Project](..#importing-spring-beans-into-the-project) on how to do this. Once done,
Spring will use the custom bean when configuring the cube’s measures.
