VM uptime with influx and grafana

Hi there,
hopefully someone can give me some pointers here.
I’m using webhooks from my hypervisor on VM.OFF and VM.ON actions, they send some json to my python script and I then add those values to an influx db which looks like this:

time event_type state type vm

1594974437641200169 VM.OFF 0 VM.OFF vmxyz
1594974604847321102 VM.ON 1 VM.ON vmxyz
1594974808194163992 VM.OFF 0 VM.OFF vmxyz

The entries can be adjusted, this is just my first test to get something working (new to influx and grafana). I now want to create a dashboard that shows me the total power on time for a VM for a specific time period, is that even possible with that data?

Would appreciate any help greatly!