[Yandex Cloud documentation](../../../index.md) > [Yandex DataLens](../../index.md) > Troubleshooting > Division by zero

# [Yandex DataLens] Division by zero

`ERR.DS_API.DB.ZERO_DIVISION`

An error occurred when dividing by zero in a query.

The data source does not support dividing by zero.

To fix the error, check and correct the formulas.

For example, if the error was caused by this formula:
```
[A] / [B]
```

You can rewrite it as follows:

```
IF([B] != 0, [A] / [B], NULL)
```

Alternatively, you can use another numeric value instead of `NULL`, depending on the result you need.

You can also use the [DIV_SAFE](../../function-ref/DIV_SAFE.md) and [FDIV_SAFE](../../function-ref/FDIV_SAFE.md) functions that can handle division by zero.