topk-others-min
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 minimum aggregation. This provides a way to focus on the highest
performers while showing the minimum 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
:min
aggregation
- Output: Returns K+1 time series (K individual + 1 "others" minimum)
Examples
Show top 2 clusters by maximum value, with minimum of others:
Before | After |
 |  |
name,sps,:eq,
(,nf.cluster,),:by
| name,sps,:eq,
(,nf.cluster,),:by,
max,2,:topk-others-min
|
Since: 1.7