Hi,
Think it depends on how the data are sorted when returned from influxdb. If you can sort it by highest value in influxdb query.
Marcus