Skip to content

quantile

Computes the specified quantile of all grouped values.

quantile(xs:list, q=float) -> float

The quantile function returns the quantile of all numeric values in xs, specified by the argument q, which should be a value between 0 and 1.

The values to evaluate.

The quantile to compute, where q=0.5 represents the median.

Compute the 0.5 quantile (median) of values

Section titled “Compute the 0.5 quantile (median) of values”
from {x: 1}, {x: 2}, {x: 3}, {x: 4}
summarize median_value=quantile(x, q=0.5)
{median_value: 2.5}

median, mean