Influxdb: Can't use ABS with aggregations

Created on 5 Sep 2018  路  3Comments  路  Source: influxdata/influxdb

__System info:__ InfluxDB 1.6.2, Ubuntu 16.04.3

__Steps to reproduce:__

  1. Have measurements with both negative and positive values
  2. Run a query requesting the sum of the absolute values

__Expected behavior:__
SUM(ABS("value")) should return the sum of the absolute values of _value_. - e.g. if the values are -1, 3, -5 the result should be 9.

__Actual behavior:__

ERR: expected field argument in sum()

__Additional information:__
I've tried with MEAN(SUM("value")) too and that gives a similar error.

Most helpful comment

Are there any enhancement related with issue? I have similar problem using ABS with aggregation.

All 3 comments

I think that influx doesn't support nesting functions with sum and mean, they must receive a field argument, as it says. Try using a nested query.

We don't support these nested functions.

Are there any enhancement related with issue? I have similar problem using ABS with aggregation.

Was this page helpful?
0 / 5 - 0 ratings