Hello everyone,
I try to create an alert for ratio between 2 series (pressure and speed of a machine).
The database is captured any changes in series and speed of the machine is usually stable, so I must use previous value to calculate the ratio.
I’m able to visualize the ratio value on graph, however alert usually return to Null.
I see your alert evaluates Query A. Is Query A the one where you are calculating the ratio and successfully visualizing it on the graph (per your original screenshot)? Maybe post it here just so it is clear.
If yes, then perhaps the query interval is such that there are ‘null’ periods and when the alert is checking, it usually evaluates during such a period. I think you can fix this by playing with the times (every 5s, every 30s, etc) of the query and the alert.
I can confirm the Query A is the ratio. In deed there’re “null” periods when the data haven’t changed so the IoT system would not record any new data. So in the query, I used parameter “usePrevious: true” to fill “null” periods with previous value and it’s able to visualize on Graph. I guess that it works on Graph but the alert doesn’t not work that way.