Equivalence in Grafana of the Influx "increase" command

I am using a sensor that is increasing all over the day and reset at midnight.
In order to ghet daily graph, i use the spread function.
nevertheless I have sometimes one or 2 reset during the day that put the sensor at zero.
I would a function as “increase” in Influx that works very well.
Is there any equivalent to this function in Grafana ?
Thanks per advance

Hi Phil.

Is your datasource InfluxDB? (and if so, which version)

If your Influx query works well in Influx, why wouldn’t it work in Grafana?

Hi Grant
My InfluxDB version is 2.0.9.
The issue is not with InfluxDB. I can find the wanted function in Influx ( increase).
The issue is to find the equivalent of the increase function in Grafana.
Thanks per advance

Can you post your Flux query here (which works in InfluxDB)?

Thank you Grant2 for your help:

As you can see in this influxdb graph, i have a sensor that sends a total that is continuously increasing all over the day EXCEPT when there is a reset or a reboot (update for exemple) of ESPHOME.
The attached screen shows the gross curve with a standard “mean” function with a reset in the midle plus a certain time without values. (blue curve)
The second curve uses the function “increase” that would be perfect as the curve is now continuously increasing. (red or purple curve)
From this curve I could make a sum of all the increases and get the total increase per day.

The issue is that I cannot find the equivalent function in grafana as the “increase” in infludb

Please help

1 Like

So I just started using Influx 2.0, but if I understand it correctly, you can click on Script Editor in the Data Explorer window you have shown and it will display the Flux query. In fact, that is what I was expecting you to post here on the forum.

Then I would copy & paste that Flux query into Grafana’s query editor and see what comes up.

My feeling is that if you have this working in the InfluxDB data explorer, then you can definitely reproduce it in Grafana.

Thank you but it will not help me at short term as the script editor seems to give a script in flux language.
I currently use influxql language

I would suggest you post the Flux query (that works) here and ask how to write the same query in InfluxQL.

This topic was automatically closed after 365 days. New replies are no longer allowed.