Using Grafana for analysing data and calculations

Hey,
I need a tool that can do calculations with my data, like I can do with VBA.

The specific use case is, that I have different timestamps and need to calculate the time that is in between. So like a Object is passing through and a sensor needs to get the time between the objects. This data needs to be visualised in a dashboard.

Can i do something like this with grafana?

Thanks for your help.

Grafana has support of transformations, including Add field from calculation:

In my opinion, it can often be better to do the calculations in your queries. What is your datasource? InfluxDB has all sorts of tools for doing calculations on timestamps. Do any of these solutions help?

Count how long a value is 1 or 0 (on or off)
Calculating total ON or OFF time for a period (day, month, etc.).
Computing duration of a state using events.duration function

2 Likes