# AVERAGEEXNEG

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

### Syntax

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

### Arguments

<table><thead><tr><th width="130.6657263751763">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 Profit of a particular product across different regions East, South, Central and West to be as follows. Assume if Profit for a particular period is negative, the product was withdrawn from the market and hence that region need not be considered for calculating average Profit.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FOwbvDwZdwIqUsasubWXS%2Fimage.png?alt=media&#x26;token=69f9b3dd-1a9d-42ca-9c9f-4fcbcbed46f3" alt=""><figcaption></figcaption></figure>

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

<mark style="color:blue;">**`AVERAGEEXNEG`**</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="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FXqeWUnvvshP40JvPK81M%2Fimage.png?alt=media&#x26;token=81a6557c-db9b-4c21-a191-7774346ea793" alt=""><figcaption><p><strong>Average Excluding Negative</strong></p></figcaption></figure>
