In Pigment, selecting multiple items of a Dimension in Page or removing a Dimension from a View will trigger an aggregation.

By default, a sum is applied to the data. For example:

- If you select 2 months, Pigment will, by default, sum those 2 months.
- If you remove the "Month" Dimension, Pigment will sum every month.

However, there will be times when you will want change the default aggregator.

**Custom aggregators** are the solution to customizing the mathematical operations behind those aggregations.

## Where can I set up Custom Aggregators ?

If you have hidden Dimensions or Pages, you will find a new section in the Total panel: **Dimension set as Page or hidden**. As mentionned above, the default aggregation is a `Sum`

.

You will be able to set up the default operation to aggregate the data. Hence, you will be able, for Number and Interger types for example, to:

`Avg`

: Calculate an average of the underlying data`Last`

: Keep the last of the underlying data`Min`

`Max`

: Keep the min / max value of the underlying data-
`Count`

/`Countall`

/`Count distinct`

/`Count blank`

: count the number of data aggregated according to the method chosen

In the screenshot below we modified the Aggregator to average:

Once you have selected the Aggregator click on **Apply**.

The cross () next to the Aggregator chosen allows you to cancel the Custom Aggregation and get back to the default `Sum`

.

## What is the difference between time and non time Dimensions ?

You will be able to set up a custom Agreggator for:

- All
**time****Dimensions**: Dimensions that are created by the calendar such as`Month`

or`Year`

- All
**non time****Dimensions**: all other Dimensions

Note that aggregations are performed in this exact order: **(1)** non-time Dimensions first then **(2)** the other Dimensions. This is important to remember when Aggregators are not commutatives (e.g. the sum of averages is not equal to the average of sums).

Hovering the non time Dimension label allows you to check what are the hidden Dimensions :

## Example

In this example, the metric is calculating a Yield ratio per sub region and segment.

If we remove the Segment Dimension, a new item appears in the Total panel :

We specified an average to calculate the average Yields within all the Segment instead of summing them.

## Comments

0 comments

Please sign in to leave a comment.