Count_over_time() on results of Log panel


Grafana 8.1.1 on Linux

I’m trying to find out if it is possible to use count_over_time() on the results of a Log panel.

I have a dashboard with two panels; one is a Log panel with several queries to Loki. The other is a Graph panel graphing how many log messages per minute are shown. This Graph panel uses the same queries as the Log panel, only with the count_over_time() function added. This works, but it does mean that the Loki queries have to be updated in two places.

I noticed that with Grafana 8 I can now use the results from the Log panel as data source for the Graph panel. My question is: is it also possible to apply the count_over_time() function to these results? Via a transformation perhaps?

I’ve only recently started exploring the wonderful world of Grafana, so any hints are welcome!

Best regards, Roel