Gauge bar sum on range times

Hi all, I have been “fighting” with this for hours and I’m getting crazy :slight_smile:

I have the following query and table

In a time series view, it is work well:

But, when I try to represent in a Gauge bar the sum of the differents values into the selected range, Grafana draws the latest value:

I tried to configure the chart selection “calculation → total”, I have the sum of all the time series, from the beginning of the query, not the selected range (6h for example):

Is there any way to sum only the values in the selected range? 6h, 3h, 2d, etc?

Thank you very much!!!

I solved it! It was only question of delimitate the date with the time vars of Grafana, adding to the query: where d1_time between $__timeFrom() AND $__timeTo()

1 Like