# Calculation Examples

The Advanced Scanner supports a set of arithmetic functions that can be applied to available data points. Available functions include **Average, Sum, Max, Min, First,** and **Last.** Each function is evaluated directly within the scan, allowing you to construct filters and columns that return calculated results. This article provides examples of how to use each function.

## Average

This example creates a column that returns the average volume over the previous 5 trading days.

<figure><img src="https://1155519678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fon2dmGeVODO8QCgecDSI%2Fuploads%2FuzAMw5FkueLwHeH4XcXx%2Fcolumn_avg_vol_5_days.png?alt=media&#x26;token=26f25176-b215-467d-8679-5b9cc4a17fe0" alt=""><figcaption></figcaption></figure>

## Sum

This example creates a column that returns the total volume for the first 30 minutes of trading.

<figure><img src="https://1155519678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fon2dmGeVODO8QCgecDSI%2Fuploads%2F6IuKMyeqTlpRad9l2tSm%2Fcolumn_30min_vol.png?alt=media&#x26;token=acc787c2-827d-4fd0-8a3c-c2bf80954b04" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
In this example, **Bar Size** is set to 30 minutes, but using 1, 5, 15, or 30 minutes will all produce the same result.
{% endhint %}

## Max

This example creates a column that returns the highest price during the first 15 minutes of trading.

<figure><img src="https://1155519678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fon2dmGeVODO8QCgecDSI%2Fuploads%2FZ4zvnvw9SbvcyasOWPI7%2Fcolumn_15min_high.png?alt=media&#x26;token=5afe8da0-f14f-471e-9b1f-4451b29b66c9" alt=""><figcaption></figcaption></figure>

## Min

This example creates a column that returns the lowest price during the first 15 minutes of trading.

<figure><img src="https://1155519678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fon2dmGeVODO8QCgecDSI%2Fuploads%2FVIk8CAeaQW4oMUq0FF8f%2Fcolumn_15min_low.png?alt=media&#x26;token=cca47b29-0895-4587-b475-90bd631d3009" alt=""><figcaption></figcaption></figure>

## First

This example creates a column that returns the first traded price between 7:00 AM and 9:29 AM.

<figure><img src="https://1155519678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fon2dmGeVODO8QCgecDSI%2Fuploads%2FgVp8MJWFVnyh90PPdaOu%2Fcolumn_calc_first.png?alt=media&#x26;token=5b53ff65-7dd1-4ac9-b36c-b281e0f3cea9" alt=""><figcaption></figcaption></figure>

## Last

This example created a column that returns the last traded price between 7:00 AM and 7:59 AM.

<figure><img src="https://1155519678-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fon2dmGeVODO8QCgecDSI%2Fuploads%2F81e5f0Gum2vUZQYON4aj%2Fcolumn_calc_last.png?alt=media&#x26;token=8e0ba067-4d80-4573-9529-99905d7ead2c" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
**Tip:** You can use these same selections to create a filter instead of a column.
{% endhint %}
