Skip to content
Legacy docs for Tenzir v5.x. For the latest Tenzir v6 series, visit docs.tenzir.com. Migrating from v5? Read the Tenzir v6 migration guide.

Computes the approximate median of all grouped values using a t-digest algorithm.

median(xs:list) -> float

The median function returns an approximate median of all numeric values in xs, computed with a t-digest algorithm.

The values to evaluate.

from {x: 1}, {x: 2}, {x: 3}, {x: 4}
summarize median_value=median(x)
{median_value: 2.5}

Last updated: