hello everyone,
I would like to display my electricity consumption daily in Grafana as a bar chart.
The data is available in HA in InfluxDB 1.x.
In Grafana, I defined the following query using GrafanaQL:
Query A:
SELECT (last(“value”) - first(“value”)) * -1 AS “Einspeisung”
FROM “Wh”
WHERE “entity_id” = ‘iometer_gesamteinspeisung’
AND $timeFilter
GROUP BY time(1d)
fill(previous)
tz(‘Europe/Berlin’)
Query B:
SELECT (last(“value”) - first(“value”)) AS “Bezug”
FROM “Wh”
WHERE “entity_id” = ‘iometer_gesamtbezug’
AND $timeFilter
GROUP BY time(1d)
fill(previous)
tz(‘Europe/Berlin’)
The time interval is set to seven days:
In principle, all values except the oldest are displayed correctly.
What can I do to ensure that the first value is also displayed correctly?
Thanks in advance for your support.