derivative() function

    *Function type: Transformation
    **
    Output data type:* Float

    The time duration used when creating the derivative. Defaults to 1s.

    Indicates if the derivative is allowed to be negative. Default is . When true, if a value is less than the previous value, it is assumed the previous value should have been a zero.

    *Data type: Boolean*

    *Data type: String*

    The column containing time values. Defaults to "_time".

    For each input table with rows, derivative() outputs a table with n - 1 rows.

    1. from(bucket: "example-bucket")
    2. |> derivative(unit: 1s, nonNegative: true)

    Related articles