Rollup is a very powerful and important type of summary. It is a smart aggregation function that uses the original metric to calculate the aggregation instead of simply summing or averaging the individual rows. Summing and averaging of rows may lead to "sum of counts of not mutually exclusive sets" respectively "averages of averages" results which are not always the desired result.

Rollup on Count Measures

When you use rollup on a column that contains a count measure it does not do a simple sum of the individual rows. Rollup calculates the underlying measure without the segmentation applied in the table. Sum of individual rows may cause "sum of counts" counting the same item multiple times in some cases.

In the following example we have 2 conversations. The Conversation A has two segments as Mary forwards a call to Josh. The seconds conversation has only one segment handled by Mary.

Now if you create a table with number of conversations segmented by agents you will get this result:

The segmented table attributes 2 conversations to Mary because she participated in them. It also attributes one conversation to Josh because Mary forwarded a call to him.

Sum of rows results in 3 conversations because the Conversation A is counted twice - once for Mary, once for Josh. Rollup does not simply sum the rows. Rather it calculates the metric again without considering attribution to Mary and Josh.

Rollup on Average Measures

When you use rollup on a column that contains an average measure it does not do a simple average of the individual rows. Rollup calculates the underlying measure without the segmentation applied in the table. Average of individual rows may lead to calculating "averages of averages" which is often not desirable.

In the following example we have 3 segments handled by two different agents:

Now if you create a table with average talk time segmented by agents you will get this result:

The results differ because the simple average takes averages of all agents and then calculates the average of those averages. Such value may be significantly different from an overall average talk time of individual segments.

Average summary results in the formula ((1:00 + 9:00)/2 + 2:00)/2 = (5:00 + 2:00)/2 = 7:00/2 = 3:30 .
Rollup summary results in the formula (1:00 + 9:00 + 2:00)/3 = 12:00/3 = 4:00 .

Did this answer your question?