---
metadata:
  - name: generator
    content: Diplodoc Platform v5.63.0
alternate:
  - >-
    en/troubleshooting/errors/ERR-DS_API-FORMULA-VALIDATION-LOD-INCOMPATIBLE_DIMENSIONS
  - >-
    ru/troubleshooting/errors/ERR-DS_API-FORMULA-VALIDATION-LOD-INCOMPATIBLE_DIMENSIONS
  - href: >-
      en/troubleshooting/errors/ERR-DS_API-FORMULA-VALIDATION-LOD-INCOMPATIBLE_DIMENSIONS.md
    type: text/markdown
    title: Markdown version
csp:
  - script-src:
      - https://mc.yandex.ru
    img-src:
      - https://mc.yandex.ru
    connect-src:
      - https://mc.yandex.ru
      - wss://mc.yandex.ru
    child-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-src:
      - 'blob:'
      - https://mc.yandex.ru
    frame-ancestors:
      - 'blob:'
      - https://mc.yandex.ru
canonical: >-
  en/troubleshooting/errors/ERR-DS_API-FORMULA-VALIDATION-LOD-INCOMPATIBLE_DIMENSIONS.html
title: >-
  DataLens On-premises error
  ERR.DS_API.FORMULA.VALIDATION.LOD.INCOMPATIBLE_DIMENSIONS
description: This page describes the Incompatible dimensions DataLens On-premises error.
vcsPath: >-
  en/troubleshooting/errors/ERR-DS_API-FORMULA-VALIDATION-LOD-INCOMPATIBLE_DIMENSIONS.md
---

# [DataLens On-premises] Incompatible dimensions

`ERR.DS_API.FORMULA.VALIDATION.LOD.INCOMPATIBLE_DIMENSIONS`

The error is there because aggregations at the same nesting level have different sets of dimensions.

For example, you cannot create the following measure in a chart grouped by `[Region]` and `[Category]`:

```
ARG_MAX(
     ANY([City] INCLUDE [City]),
     AVG([Sales] INCLUDE [Order Date])
)
```

The `ANY([City] INCLUDE [City])` and `AVG([Sales] INCLUDE [Order Date])` aggregations are at the same nesting level (inside `ARG_MAX`). The first aggregation has the `[City]` dimension; the second one, `[Order Date]`. In this case, the error results from there being no other aggregation with both of these dimensions.

To correct the error, modify the expression to have one of the nested aggregations include all the dimensions used in the other nested aggregations. For example:

```
ARG_MAX(
     ANY([City] INCLUDE [City]),
     AVG([Sales] INCLUDE [City],[Order Date])
)
```

For more information about using LOD expressions, see [LOD expressions and filtering management in aggregation functions in DataLens On-premises](../../concepts/lod-aggregation.md).
