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:
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:
max balance date, giving you the last balance date across all balance dates.
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 patterngroup_<aggregation>:
Flexible aggregation
Thegroup_aggregate function gives you more control over aggregation and filtering. See Flexible aggregation functions to learn more.