# AVERAGEEXZERO

The AVERAGEEXZERO function returns the average (arithmetic mean) of its arguments excluding zeros, which can be numbers or node references.

### Syntax

AVERAGEEXZERO(value1, ...valueN?) - > number

### Arguments

<table><thead><tr><th width="130.78212290502793">Arguments</th><th width="140">Datatype</th><th width="512">Description</th></tr></thead><tbody><tr><td>value1</td><td>Number/Node reference</td><td>The first node or number to be averaged. This is a required argument.</td></tr><tr><td>...valueN?</td><td>Number/Node reference</td><td>The additional nodes or numbers to be averaged. These are optional arguments.</td></tr></tbody></table>

### Example&#x20;

Consider the sales of a particular product across different regions East, South, Central and West to be as follows. Assume if sales for a particular period is zero, the product was withdrawn from the market and hence that region need not be considered when calculating the average sales.

<figure><img src="/files/SaFKis8kD5a22XBILn3I" alt=""><figcaption><p><strong>Sales</strong></p></figcaption></figure>

To achieve this, the following formula should be written in the \[Average Sales] node:

<mark style="color:blue;">**`AVERAGEEXZERO`**</mark>**`(`**<mark style="color:purple;">**`[East]`**</mark>**`,`**<mark style="color:orange;">**`[South]`**</mark>**`,`**<mark style="color:red;">**`[Central]`**</mark>**`,`**<mark style="color:green;">**`[West]`**</mark>**`)`**

### Result

<figure><img src="/files/y7OvPLOGuaqf4K58R4L6" alt=""><figcaption><p><strong>Average Excluding Zeros</strong></p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.valq.com/model/formula-functions/math-functions/averageexzero.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
