> For the complete documentation index, see [llms.txt](https://concentra-analytics.gitbook.io/working-with-data/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://concentra-analytics.gitbook.io/working-with-data/numbers/average.md).

# Average

Whilst some tools will let you calculate other types of average, like Median or Mode, most will default to displaying the Mean average, i.e. the sum of a set of numbers divided by how many numbers there are.

In most cases, this will be the average within a field of numerical data, though you might also want to average a filtered subset of numbers or a list of numbers provided by you, e.g. as an array \[2,7,8,3]. All the average functions below will allow you to choose either a set of numerical values or specify your own.

## Excel

\=\~AVERAGE!\~(‹number\_array›) \
&#x20;\=\~AVERAGE!\~(‹number1›«, number2», «numberN»)

```
=AVERAGE(A:A)
// OR
=AVERAGE(2,7,8,3) // Returns 5
```

NB. If you want to calculate the Median or Mode average, you can do so using: \
&#x20;\=\~MEDIAN!\~(‹number1›«, number2», «numberN») \
&#x20;\=\~MODE!\~(‹number1›«, number2», «numberN»)

## Tableau

\~AVG!\~(‹measure›)

```
AVG([Bonus])
```

## Alteryx

Use the **Summarize** tool (in the **Transform** palette): \
\
&#x20;![](/files/-M4uOvxUEUeoyn7Cjyty)

(group by field, average by measure).

## OrgVue

‹measure›.\~avg!\~; \
&#x20;‹number\_array›.\~avg!\~; <br>

```
nodes().bonus.avg;
// OR
array(2,7,8,3).avg // Returns 5
```

## tSQL

\~AVG!\~(‹measure›)

```
SELECT AVG(Profit)
FROM SalesData
```

## Python

numpy.\~mean!\~(‹number\_array›)

```
import numpy

numpy.mean([2,7,8,3]) # Returns 5.0
```

NB.:

* This requires the `numpy` library to be imported.&#x20;
* The above example assumes a variable has been declared for `profit`. For more information, go to [General > Variables](https://orgvue.gitbooks.io/formula-translator/content/general/variables.html).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://concentra-analytics.gitbook.io/working-with-data/numbers/average.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.
