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

# Cube filters on limit KPIs

> How to enable or disable cube filters on limit KPIs in Atoti Limits using the limits.cube.kpi-filters-enabled property, with use case examples showing how filters affect evaluated limit values at different scope levels

## Overview

You can now enable/disable filters on limit KPIs when viewing the KPIs in the business cube.
This helps reduce operational risk where a user may see that a limit is passing, when in fact it is
in breach.

This feature does not affect the evaluation of limits via the UI or REST services, which in fact
operate as if the filters were disabled.

This feature also applies to the filtering effect of default MDX members in the configuration
of your business cube. Please see the [Atoti Server documentation](https://docs.activeviam.com/products/atoti/server/6.1/docs/mdx/mdx_filtering/#mdx-default-members) for more information on MDX default members.

## Configuration

KPI filters are enabled by default. This is to ensure behavior remains the same as previous versions
of Atoti Limits. To disable them, set the `limits.cube.kpi-filters-enabled` property
to `false` in your `application.yml`.

## Use cases

To illustrate the effects of enabling and disabling filters, consider the following pivot:

<table><thead><tr><th>Book</th><th>ID</th><th>PnL</th></tr></thead><tbody><tr><td>Book 1</td><td>1</td><td>1000</td></tr><tr><td>Book 1</td><td>2</td><td>2000</td></tr><tr><td>Book 1</td><td>3</td><td>3000</td></tr><tr><td>Book 2</td><td>1</td><td>1000</td></tr><tr><td>Book 3</td><td>1</td><td>1000</td></tr></tbody></table>

We will create limits on the `Book` level at each of the `AllMember`, `Wildcard`, and `Book 1`
members. For cases 3-6 inclusive, we shall also apply a default MDX member of `ID = 1` to illustrate
the effect of overriding the default member at runtime.

### Case 1: A cube filter is set at the limit level

Here we apply a filter on `Book = Book 1` via the UI.

#### Enabled:

When filters are enabled, the `Book = Book 1` value should be used.

<Frame>
  <img src="https://mintcdn.com/activeviam/iy5FyCKdXjhHAnDS/atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/enabled-case-1.png?fit=max&auto=format&n=iy5FyCKdXjhHAnDS&q=85&s=ac1f4711ff3d605ca5c91a180577516e" alt="Enabled" width="1912" height="988" data-path="atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/enabled-case-1.png" />
</Frame>

#### Disabled:

When filters are disabled, the true value of the `Book` level should be used.

<Frame>
  <img src="https://mintcdn.com/activeviam/iy5FyCKdXjhHAnDS/atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/disabled-case-1.png?fit=max&auto=format&n=iy5FyCKdXjhHAnDS&q=85&s=cb6883e089d6fc7b3fc7e6cbcb2e28a3" alt="Disabled" width="1913" height="987" data-path="atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/disabled-case-1.png" />
</Frame>

#### Difference:

Notice the difference in the `AllMember` limit.

### Case 2: A cube filter is set below the limit level, contributing to the limit value

Here we apply a filter on the `ID=1` member.

#### Enabled:

When filters are enabled, only the `ID=1` member contributes to the limit value.

<Frame>
  <img src="https://mintcdn.com/activeviam/iy5FyCKdXjhHAnDS/atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/enabled-case-2.png?fit=max&auto=format&n=iy5FyCKdXjhHAnDS&q=85&s=59bff041a8532099dac247b4693608a3" alt="Enabled" width="1912" height="986" data-path="atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/enabled-case-2.png" />
</Frame>

#### Disabled:

When filters are disabled, all `ID` members contribute to the limit value.

<Frame>
  <img src="https://mintcdn.com/activeviam/iy5FyCKdXjhHAnDS/atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/disabled-case-2.png?fit=max&auto=format&n=iy5FyCKdXjhHAnDS&q=85&s=2654b085fa901593909d3ddc05775ffb" alt="Disabled" width="1915" height="993" data-path="atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/disabled-case-2.png" />
</Frame>

#### Difference:

Notice that when enabled, the limit value for all limits is `1000`. When disabled, the limit value is
the true unfiltered value for each limit.

<Note>
  The limit value is different from the actual `PnL` when filters are disabled. This is
  because the filters are still applied to the rest of the cube, but not to the limit value. This behavior
  will be visible in the following cases as well.
</Note>

From now on, we also apply a default MDX member of `ID = 1`.

### Case 3: The default MDX member’s level is in view, meaning the MDX filter is not applied

When filters are either enabled or disabled, the true value will be used.

#### Enabled:

<Frame>
  <img src="https://mintcdn.com/activeviam/iy5FyCKdXjhHAnDS/atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/enabled-case-3.png?fit=max&auto=format&n=iy5FyCKdXjhHAnDS&q=85&s=6a49ac89b59b36596e454bc4b2ef856f" alt="Enabled" width="1913" height="988" data-path="atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/enabled-case-3.png" />
</Frame>

#### Disabled:

<Frame>
  <img src="https://mintcdn.com/activeviam/iy5FyCKdXjhHAnDS/atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/disabled-case-3.png?fit=max&auto=format&n=iy5FyCKdXjhHAnDS&q=85&s=0d040b77f6077c2e2777848afbb5bb3a" alt="Disabled" width="1914" height="990" data-path="atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/disabled-case-3.png" />
</Frame>

### Case 4: The default MDX member’s level is not in view, meaning the MDX filter is applied

#### Enabled:

When filters are enabled only the `ID=1` member contributes to the limit value.

<Frame>
  <img src="https://mintcdn.com/activeviam/iy5FyCKdXjhHAnDS/atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/enabled-case-4.png?fit=max&auto=format&n=iy5FyCKdXjhHAnDS&q=85&s=ce526b9ede9c665c6c977416976e9687" alt="Enabled" width="1914" height="988" data-path="atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/enabled-case-4.png" />
</Frame>

#### Disabled:

When filters are disabled, all `ID` members contribute to the limit value.

<Frame>
  <img src="https://mintcdn.com/activeviam/iy5FyCKdXjhHAnDS/atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/disabled-case-4.png?fit=max&auto=format&n=iy5FyCKdXjhHAnDS&q=85&s=74bcc18eb434793ee96b753e016c7159" alt="Disabled" width="1913" height="989" data-path="atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/disabled-case-4.png" />
</Frame>

### Case 5: A cube filter is applied, overriding the default MDX filter

Here we apply a filter on `ID = 2` via the UI.

#### Enabled:

When filters are enabled, only the `ID=2` member contributes to the limit value.

<Frame>
  <img src="https://mintcdn.com/activeviam/iy5FyCKdXjhHAnDS/atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/enabled-case-5.png?fit=max&auto=format&n=iy5FyCKdXjhHAnDS&q=85&s=de1dfb0dafcfde5df0a93ad463939b39" alt="Enabled" width="1909" height="989" data-path="atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/enabled-case-5.png" />
</Frame>

#### Disabled:

When filters are disabled, all `ID` members contribute to the limit value.

<Frame>
  <img src="https://mintcdn.com/activeviam/iy5FyCKdXjhHAnDS/atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/disabled-case-5.png?fit=max&auto=format&n=iy5FyCKdXjhHAnDS&q=85&s=44a897278bf25686fa043f8206c833e9" alt="Disabled" width="1906" height="987" data-path="atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/disabled-case-5.png" />
</Frame>

### Case 6: A query time MDX default member filter is applied, overriding the default MDX filter

Here we apply a query time MDX default member on `ID=2`.

#### Enabled:

When filters are enabled, only the `ID=2` member contributes to the limit value.

<Frame>
  <img src="https://mintcdn.com/activeviam/iy5FyCKdXjhHAnDS/atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/enabled-case-6.png?fit=max&auto=format&n=iy5FyCKdXjhHAnDS&q=85&s=d48da9da986e3fdc1c4df3d026d01d4e" alt="Enabled" width="1916" height="989" data-path="atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/enabled-case-6.png" />
</Frame>

#### Disabled:

When filters are disabled, all `ID` members contribute to the limit value.

<Frame>
  <img src="https://mintcdn.com/activeviam/iy5FyCKdXjhHAnDS/atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/disabled-case-6.png?fit=max&auto=format&n=iy5FyCKdXjhHAnDS&q=85&s=dc967b6b215395f165fc99e2bfa5924d" alt="Disabled" width="1907" height="993" data-path="atoti-intelligence/workflows/limits/6.1/images/cube-limit-kpi-filters/disabled-case-6.png" />
</Frame>
