Hi All, I’d like to visualize the difference of a InfluxDB measurement for the time range of the current dashboard. For instance, if the current dashboard range is [now, now-8d] I’d like to visualize the result of: measurement(now) - measurement(now-8d).
I’ve seen in the Grafana documentation that for Prometheus there is the $__range variable that can be used for such an operation. How can I do this for InfluxDB?
In Flux, assuming you are using nanosecond precision, I believe you can create a new column (e.g. called PeriodTime) by converting the timeRangeStart and timeRangeStop timestamps to int, subtracting, and then converting from nanoseconds to hours: