GROUPSUM

Syntax

GROUPSUM(<number>)

Description

Adds its arguments.

Empty or <null> records of a group aren't calculated into GROUPSUM().

Calculating a column with a (or multiple) <error> records always returns an error for its group.

This is an aggregate function

Example

Given the following data:

GroupsParticipants
group16
group118
group15
group15
group1<null>
group245
group276
group2104
group216

group2

3
group35
group317
group3<error>

First create a group using GROUPBY(#RawData!Groups)

Groups
group1
group2
group3

Then use the GROUPSUM(#RawData!Participants). The result is the sum of the values of the column in relation to the GROUPBY() column.

GroupsParticipants_SUM
group134
group2244
group3<error>

Additional Information

Replicate the SUMIF Function 

The SUMIF function can be accomplished by combining the two separate functions GROUPSUM and IF.

Example

Given the following data:

KeyValue
11
12
21
22
23

first create groups that contain the values you want to sum. This example excludes values less than 2 from the total sum.

GROUPSUM( IF( (#Data!Value >= 2); #Data!Value; 0) )

The result of this formula executes the GROUPSUM function with the specified conditional statement. Both the groups had a value that was 1. This value was changed to 0 as specified in the IF statement. The new sum of the groups in this example are displayed in the Total_Value1 column.

KeyTotal_ValueTotal_Value1
132
265