I have an influxdb system and I’m trying to use a table panel to show the last value for devices with a value in a specific range. If i put the condition in the where clause, it limits the query and then returns the last value. Is there another way to limit the results either in another way in the query or after the results come back from the database?
As an example of the problem, here is a query that will not work properly:
SELECT last(“value”) FROM “battery” WHERE (“value” < 41) AND $timeFilter GROUP BY “deviceName”
When a battery is replaced, the value will be 100 but there are still values less than 41 so those will show up even though the last value is 100.
Thank you