## Using aggregate functions

Aggregate functions are used whenever we want to perform calculations on measure objects. This isn't always the case as we can also perform a count calculation on a dimension or an attribute object.

We distinguish between two main uses of aggregative functions as follows:

A summarized aggregative function returns the result in the footer or in a single cell, such as

**Sum**or a**Max**calculationA row-level calculation shows the aggregative result, such as the percentage

The main aggregative functions are as follows:

**Sum****Average****Min/Max****Percentage****Count**

### How to do it...

The
`count`

function counts each unique value once, so if we have 10K rows that contain only seven different values, the result of `count`

will be 7.

If we need to count the number of rows in a table, regardless of whether a value exists in a specific row or not, we use the
`count all`

syntax.

As we know, every formula starts with the equals to sign, so we basically use the count syntax and add the `all`

option...