The unique count aggregation type counts only the unique values of a specified event property.Documentation Index
Fetch the complete documentation index at: https://getlago.com/docs/llms.txt
Use this file to discover all available pages before exploring further.

UNIQUE COUNT billable metric
- Dashboard
- API
Here is how you can create a unique count 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 “count unique” as the aggregation type;
- Define if this metric is
meteredorrecurring; - Define the property to aggregate;
- Apply dimension groups if any; and
- Click “Add billable metric”.
This billable metric can be both
metered or recurring.Calculation example
Lago calculates theCOUNT_DISTINCT(events.properties.property_name) for the two following events received.
request_id property in the event payloads, resulting in a billable value of 1 unit.
Adding or removing unique values
Events sent to aUNIQUE COUNT billable metric accept an operation_type property to control whether the unique value is added to or removed from the count:
add: Adds the unique value. Optional: Lago adds by default ifoperation_typeis omitted.remove: Removes the unique value from the count. Required whenever you want to explicitly remove a unit.