Using Custom Aggregators

  • 4 January 2022
  • 0 replies
  • 143 views

Userlevel 2
Badge

 

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.

 

Note

This option is only available when you have hidden Dimensions or Pages. 

 

 

How 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.

 

Click on the image to expand the view

 

 

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:

 

Click on the image to expand the view

 

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).

 

Click on the image to expand the view

 

Caveat

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

 

The hidden Dimension is ‘Segment’

 

 

 

Example

 

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

 

Click on the image to expand the view

 

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

To calculate the average Yields within all the Segments, we specified an average instead of summing them.

 

Click on the image to expand the view

 

 

 


0 replies

Be the first to reply!

Reply