Skip to content

stat-last

Input Stack:
Output Stack:
TimeSeriesExpr

Filter helper that represents the last (most recent) value statistic of the input time series. This is a placeholder that gets automatically replaced with last,:stat when used with :filter. It allows filtering based on the final datapoint value of each time series without having to duplicate the input expression.

Examples

Filtering series by final value:

BeforeAfter
name,sps,:eq,
(,nf.cluster,),:by
name,sps,:eq,
(,nf.cluster,),:by,
:stat-last,
5e3,:gt,
:stat-last,
20e3,:lt,
:and,
:filter

This filters to show only time series where the last (most recent) value is between 5,000 and 20,000.

  • :stat - Base statistics operation (stat-last represents last,:stat)
  • :filter - Filtering operation that uses stat helpers
  • :stat-avg - Filter by average values
  • :stat-max - Filter by maximum values