How to delete value range in InfluxDB/Grafana?


On creating a utility meter I did a failure and get some too higher values from a wrong source.
After correcting the source, the wrong values remain in the DB and I have no idea how to delete them without deleting the correct values. But no matter what I try, the values in the InfluxDB simply cannot be deleted.
I have to delete all values before April 1st.

The DELETE run into error

Maybe someone can help me and tell me what I’m doing wrong.


1 Like

Thanks a lot!
Found also the thread here:

That query helped me (I was very close :slightly_smiling_face: ):
DELETE FROM "kWh" WHERE ("entity_id"='hausstrom_zahler_monat') AND time <= '2023-03-31 21:59:10'

It’s not working for me. I get the same error put in the original post.

my SQL is…

DELETE FROM "homeassistant"."autogen"."°C" WHERE time > :dashboardTime: AND time < :upperDashboardTime: AND ("entity_id"='boiler_cabinet_temperature')