topk-others-max
Input Stack:k: Int | stat: String | expr: TimeSeriesExpr |
|
⇨ |
Output Stack: |
Select the top K time series based on a summary statistic and aggregate all remaining series
into a single "others" line using maximum aggregation. This provides a way to focus on the highest
performers while showing the peak value among all excluded series.
Parameters
- expr: A grouped time series expression (typically the result of :by)
- stat: Summary statistic to rank by (see :stat for available options)
- k: Number of top-performing time series to display individually
Behavior
- Ranking: Evaluates all time series using the specified summary statistic
- Selection: Selects the K series with the largest statistic values
- Aggregation: Combines all remaining series using
:max
aggregation
- Output: Returns K+1 time series (K individual + 1 "others" maximum)
Examples
Show top 2 clusters by maximum value, with maximum of others:
Before | After |
 |  |
name,sps,:eq,
(,nf.cluster,),:by
| name,sps,:eq,
(,nf.cluster,),:by,
max,2,:topk-others-max
|
Since: 1.7