Choose the Right Aggregation Type
Last updated on Aug 28, 2026
An aggregation type decides whether Maxio bills by event volume, total quantity, statistical value, or distinct values during a billing period. Match your billing goal to Count, Sum, Average, Minimum, Maximum, or Count Unique to calculate usage accurately.
You select an aggregation type from the Analysis section when creating a Meter.
Count
Count adds the total number of events received during a billing period.
Use Count when the event itself is what you bill for, not the value inside the event.
Example use cases:
- API calls made
- Documents processed
- Login events
Each valid event increases the count by 1.
Sum
Sum adds the value of a numeric property across all events in the billing period.
Use Sum when each event includes a measurable quantity.
Example use cases:
- Data transferred in gigabytes
- Seats used
- Minutes consumed
- Units processed
For example, if the selected property is gb_transferred, Maxio adds the value from each event to calculate total usage.
Average
Average calculates the mean value of a numeric property across all events in the billing period.
Use Average when the billing value is a typical rate or level, not a running total.
Example use cases:
- Average response time
- Average session duration
- Average concurrency
Minimum
Minimum returns the lowest value of a numeric property recorded during the billing period.
Use Minimum when the floor value of a metric determines the charge.
Example use cases:
- Minimum storage capacity reserved
- Lowest throughput recorded
Maximum
Maximum returns the highest value of a numeric property recorded during the billing period.
Use Maximum when peak usage determines the charge.
Example use cases:
- Peak concurrent users
- Maximum storage consumed
- Highest bandwidth spike
Count Unique
Count Unique counts distinct values for a selected property during the billing period.
Use Count Unique when you bill for the number of unique items, not total activity volume.
Example use cases:
- Unique users
- Unique devices
- Unique projects
- Unique workspaces
For example, if the selected property is user_id, Maxio counts each unique user once during the billing period.
Match your billing goal to an aggregation type
Use the following table to choose an aggregation type.
| Billing goal | Aggregation type |
|---|---|
| Bill once per event | Count |
| Bill based on total quantity | Sum |
| Bill based on typical rate or level | Average |
| Bill based on peak value | Maximum |
| Bill based on floor value | Minimum |
| Bill based on distinct values | Count Unique |
Common mistakes
Avoid these configuration mistakes:
- Using Count when events include a quantity that must be added.
- Using Sum on a property that does not represent a billable amount.
- Using Count Unique when repeated usage by the same value should increase the total.
Changing the aggregation type changes billing results. Confirm the Meter configuration before connecting it to a live product.
Related information
To create a Meter and select an aggregation type, see Get Started with Maxio Metering.
To understand how aggregation type fits with Streams, Meters, and Segments, see Understand Streams, Meters, and Segments.
Still need help?
Reach out and our support team will take it from here.
