algenty / grafana-flowcharting

Flowcharting, plugin for Grafana to create complexe visio's draws style like technical architectures, floorplan, diagrams, hierarchical schema based on draw.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace null or no value of a query result(metric) with a specific value

github-ps1304 opened this issue · comments

Hi I am using your panel extensively and love it !! THANKS.

Question: is there any way to "overwrite" a query result that has no value or null with a defined value?

Example: I am calculating the self consumption of my solar module, for a period of time the query returns no value or null. Is it possible to replace it with 100%.

My query:
SELECT 100 - (last(einspeisung) / last(pv1))*100 from (SELECT sum("PVGesamt") / 60000 AS "pv1" FROM AC WHERE time>= $Heute), (SELECT sum("Bezug")/ -60000 AS "einspeisung" FROM AC WHERE "Bezug" <=0 AND time>= $Heute) fill(null)

regards Peter