Multiple time-related columns in Time series

Good Day,

I’m using Grafana to monitor an application. Besides the usual server monitoring I’m trying to create a dashboard to monitor business data as well. I’ve successfully setup a working connection to my MySQL database. Now I’m trying to visualise some data.

The application itself stores bookings in the database. I’m trying to display those bookings in a graph formatted as a time series. The problem is that the entries provide columns for a start and end date. Now I don’t know how to create a working graph using these two columns. I need both of them to know whether an entry is active in the given time range or not.

COUNT(*) AS “value”,
validfrom AS “time_start”,
validtill AS “time_end”
FROM booking
WHERE validfrom BETWEEN __timeFrom() AND __timeTo()
AND validtill BETWEEN __timeFrom() AND __timeTo()
GROUP BY validfrom, validtill
ORDER BY validfrom, validtill;

I know that the above won’t work because I need to provide a column named time. But in my case I need two times and I don’t know how to connect them both. Is this even possible with grafana or do I need to use something else?

Thanks for any assistance.

Kind Regards,


1 Like

hello John, this is not possible with Graphana.