Sum per day in graph vs Singel Stat Panel

I have the following query for a single stat panel, which show the total consumed power the last day:
SELECT last(“value”) FROM “W” WHERE (“entity_id” = ‘power_usage_overall’) AND timeFilter GROUP BY time(__interval) fill(null)

In vizualization I have set the value display to total which shows the right result.

Now I would like to achieve the same for the last 7 days with the graph plugin, in order to get these values I use this query:
SELECT sum(“value”) FROM “W” WHERE (“entity_id” = ‘power_usage_overall’) AND $timeFilter
GROUP BY time(1d) fill(null)

In combination with the relative time option set to 7 days.

The issue: The Graph shows way to much in terms of power.

See attached screenshots:

What I’m doing wrong on here?

Last day = last 24hours. This day is not a day, which is used by “group by time(1d)” - day in this case is a time period 00:00-23:59

So there is no chance to select metrics from yesterday 00:00 - 23:59, right?

There is. Don’t overwrite relative time on the panel level and select Yesterday value as a dashboard time range.

This is true, if I want all of my panels to show yesterdays metrics, but in my case, may be for the OP, too, a single panel should show deviating data…

Try on the panel level:

Relative time: 1d
Time shift: 1d/d
1 Like

É possível somar o campo “Total” de duas interfaces de redes no Grafana?