max() function

Warning! This page documents an earlier version of Flux, which is no longer actively developed. Flux v0.12 is the most recent stable version of Flux.

The max() function selects record with the highest _value from the input table.

Function type: Selector
Output data type: Object

max()

Examples

from(bucket:"telegraf/autogen")
  |> range(start:-1h)
  |> filter(fn: (r) =>
    r._measurement == "cpu" AND
    r._field == "usage_system"
  )
  |> max()

MAX()