In its basic form, Amplitude's group-by feature is a tool for categorizing events for aggregation.
When you want to count the number of events by country, for example, you'd use a group-by:
Check out our Help Center article for a more detailed look at group-by visualization in Amplitude's Event Segmentation charts.
For performance purposes, Amplitude sets a maximum limit on the number of groups a query result can return. When this limit is exceeded, the top groups are kept, while the rest are pruned from the query result. The top groups are determined in accordance with the table below.
With a single group-by in the Event Segmentation chart, results may be limited to 100 group-by results. For double group-bys, results may be limited to 500 group by results, in which each group by value pair is counted as a single result.
This table shows how Amplitude prioritizes group-bys for display in the Breakdown Table:
Metric | Ordering |
Uniques | Number of unique users |
Totals | Total number of events |
% Active | Number of unique users |
Average | Total number of events |
Frequency | Number of unique users |
Distribution of Property Value | Total number of events |
Sum of Property Value | Sum of property values |
Average of Property Value | Sum of property values |
Distinct Property Values Per User | Total number of (user, property value) pairs |
Formulas: Percentile | Total number of events |
Formulas: Frequency Percentile | Total number of events |
Formulas: Property Count | Number of unique properties |
Formulas: Property Count Average | Total number of (user, property) pairs |
Formulas: Default | Number of unique users |
For formulas without a group-by, the ordering described above will only be used if every metric in the formula uses the same ordering. Otherwise, Amplitude will use the default formulas ordering.
For formulas with a group-by, Amplitude will rank the groups by the largest overall values per group summed across all formulas in a single expression.
If group-by pruning occurs with multiple formula terms combined with operators, formulas may take longer to load because Amplitude will issue additional queries to ensure that all formula terms are querying the same groups.
Thanks for your feedback!
June 28th, 2024
Need help? Contact Support
Visit Amplitude.com
Have a look at the Amplitude Blog
Learn more at Amplitude Academy
© 2024 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.