Summarize values over time, where value equals "1"

Hello everyone,

I’m pretty new here and started using grafana a week ago.
I’m having a little problem to create a dashboard. My Air Condition logs in a table when its turned on and off with “1” and “0”, so everytime the AC switches its state, a entry is made.
Now, I want to summarize the time, while the state of the AC was on, to get a total runtime per period in grafana, but I have absolutly no Idea how to make this panel.

Thanks for your help!

Nice regards

Hi @leonemmerich

What datasource are you using? Have you manage to query your data inside Grafana yet?