Aggregation types
MAX
The max aggregation type selects the highest value of a specified event property from all received events.
MAX calculation method
MAX billable metric
Here is how you can create a max aggregation from the UI:
- Access the “Billable metrics” section via the side menu;
- Create a new billable metric;
- Define a name, a code and an optional description;
- Select “max” as the aggregation type;
- Define the property to aggregate;
- Apply dimension groups if any; and
- Click “Add billable metric”.
This billable metric is metered
only, meaning it cannot be recurring, and the number of billing units resets to 0 at the end of each period.
Calculation example
Lago calculates the MAX(events.properties.property_name)
for the two following events received.
In that case, with this aggregation type, Lago takes the higest value of total_requests
property from all events, resulting in a billable value of 20 units.