Skip to main content
Group aggregation functions, or pinned Measures, aggregate a value by a specific attribute, such as showing revenue by product.
What if you want to aggregate a value by a specific attribute — for example, show revenue by product? This is known as a grouped aggregation, also called a pinned Measure or level-based Measure. You can do this for any aggregation using the grouping functions. Each grouping function accepts a Measure and one or more optional attributes:
Only the Measure value is required. If you supply both a Measure and an attribute, the function returns the aggregate of the Measure grouped by the attribute(s). Try it with only a Measure, and then with an attribute added, to see which output best fits your use case. group_* functions act like their own sub-queries, aggregating a column at groupings specified in the formula, which can differ from the groupings in the search query. For example:
has no groupings specified, so it’s like a sub-query max balance date, giving you the last balance date across all balance dates.
has balance date as a grouping, so it’s like a sub-query grouped by balance date, giving you the last balance date within every segment.
NotePivot tables don’t support use of group aggregation functions.

List of group functions

Group aggregation functions follow the naming pattern group_<aggregation>:

Flexible aggregation

The group_aggregate function gives you more control over aggregation and filtering. See Flexible aggregation functions to learn more.

Where to go next

Last modified on September 23, 2026