> For the complete documentation index, see [llms.txt](https://docs.tabula.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tabula.io/data-transformation/formulas/aggregate-functions/avgif.md).

# AvgIf

Gets the average value in the column filtered by the condition

```mathematica
AvgIf(column1, column2 > 10) → 31.14
AvgIf(column2, column2 < Pi()) → 2
```

#### Inputs

`AvgIf(column, [condition])`

* `column` - A column to calculate an average for
* `[condition]` - **\[optional]** - Condition to filter values in the column
