> ## Documentation Index
> Fetch the complete documentation index at: https://elementary-devin-1782754750-bigquery-permissions-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# fail_on_zero

<Card title="Generate your anomaly test with Elementary AI" icon="wand-magic-sparkles" horizontal="true" href="https://elementary-data.com/community">
  Let our Slack chatbot create the anomaly test you need.
</Card>

`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*

<RequestExample>
  ```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
  ```
</RequestExample>
