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

# fail_on_zero

> [card] [Generate your anomaly test with Elementary AI](https://elementary-data.com/community)
>
> Let our Slack chatbot create the anomaly test you need.

`fail_on_zero: true/false`

Elementary anomaly detection tests will fail if there is a zero metric value within the detection period.
If undefined, default is false.

* *Default: false*
* *Relevant tests: All anomaly detection tests*

```yml test theme={null}
models:
  - name: this_is_a_model
    data_tests:
      - elementary.volume_anomalies:
          arguments:
            fail_on_zero: true
```

```yml model theme={null}
models:
  - name: this_is_a_model
    config:
      elementary:
        fail_on_zero: true
```

```yml dbt_project.yml theme={null}
vars:
  fail_on_zero: true
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.