Skip to main content
The Sum aggregation type adds up the value of a defined event property.
Diagram of the Sum aggregation, adding up the values of a property

Sum calculation method

Sum billable metric

Here is how you can create a Sum aggregation from the UI:
  1. Access the “Billable metrics” section via the side menu;
  2. Create a new billable metric;
  3. Define a name, a code and an optional description;
  4. Select “Sum” as the aggregation type;
  5. Set the type to “Metered” or “Recurring”;
  6. Define the property to aggregate;
  7. Apply filters if any; and
  8. Click “Add billable metric”.
This billable metric can be either “Metered” or “Recurring”.

Calculation example

Lago calculates the SUM(events.properties.property_name) for the two following events received.
In that case, with this aggregation type, Lago adds up the values of the total_requests property in the event payloads, resulting in a billable value of 30 units.
On the ClickHouse-based event pipeline, a single numeric property value must stay below approximately 1.70 × 10¹² (1,701,411,834,604). The summed value over a billing period is not capped. See the limit described under properties.