Description |
Groups multiple time-series by applying an aggregation function. Choose the property to group by. |
|
Input |
Time Series: Multiple (Multiple time-series) |
|
Parameters |
Aggregation |
Mandatory (the aggregation function; avg / sum / median / std / max / min) |
|
Group By |
Mandatory (Group by property) |
Output |
Grouped Time Series: Multiple |
|
Available in |
Alerts, Composites, Dashboards |
The GroupBy function is one of the most commonly used in Anodot. Most often, it is used to aggregate multiple metrics by summing them, or averaging them across one or more properties. Other available aggregation methods for this function are grouping by median, standard deviation, max or min.
Usage Example
Say you are tracking user sessions in your website. Metrics that measure sessions are often characterized by properties such as Device_Category, Country, Time_zone, Landing_page, and so on. You can use the GroupBy function to sum the number of sessions across the different device types, which are Desktop, Mobile, and Tablet, as follows:
As expected, this function returns a chart with three metric composites:
Note that this can be executed along more than one property. For example, you can use the GroupBy function to sum the number of sessions across metrics that have both device_type and country properties:
The GroupBy function is mandatory when you’re interested in creating a composite metric that calculates the ratio between two groups of metrics that are matched in one or more dimensions. For more information and examples, visit the ratioPairs function page.
Important: GroupBy and Group functions serve different use cases, and should not be confused.