Baarken
September 22, 2020, 11:14am
1
Hi,
Consider a counter that has a counter that counts net energy for example, this counter will eventually reset once it reaches a certain value.
To calculate the power, we can use derivative(), but we get problems when the counter resets, resulting in a huge spike.
I could use non_negative_derivative(), but if the net kWh decreases this will not show.
How do people solve this problem?
Anaisdg
September 23, 2020, 5:31pm
2
Hello @Baarken ,
What version of InfluxDB are you using?
I think you could do this in Flux, but Iām not sure how at the moment.
Maybe something involving map() with conditionals.
This guide describes how to use Flux conditional expressions, such as if, else, and then, to query and transform data. Flux evaluates statements from left to right and stops evaluating once a condition matches.
1 Like