title |
description |
menu |
weight |
aliases |
related |
flux/v0.x/tags |
introduced |
experimental.mean() function |
The `experimental.mean()` function computes the mean or average of non-null values in the `_value` column of each input table.
|
flux_0_x_ref |
name |
parent |
experimental.mean |
experimental |
|
|
302 |
/influxdb/v2.0/reference/flux/experimental/mean |
/influxdb/cloud/reference/flux/experimental/mean |
|
/flux/v0.x/stdlib/universe/mean |
/{{< latest "influxdb" "v1" >}}/query_language/functions/#mean, InfluxQL – MEAN() |
|
transformations |
aggregates |
|
0.107.0 |
The experimental.mean()
function computes the mean or average of non-null
values in the _value
column of each input table.
Output tables contain a single row the with the calculated mean in the _value
column.
experimental.mean()
is an aggregate function.
import "experimental"
experimental.mean()
Parameters
tables
Input data.
Default is piped-forward data (<-
).
Examples
import "experimental"
from(bucket: "example-bucket")
|> filter(fn: (r) => r._measurement == "example-measurement" and r._field == "example-field")
|> range(start: -1h)
|> experimental.mean()