Broken expression using queries from multiple datasources


After updating Grafana, one of my panels is now showing an error: “All queries must use the same datasource”.
It used to work but not anymore.

It’s a simple expression which is the sum of 4 queries using 3 different datasources (all Prometheus DS).

The queries work but when I add the expression and hide the queries, I get the error message.

How can I do maths on my queries if they are using different DS (which was working perfectly until a recent update)?


  • What Grafana version and what operating system are you using?

  • What are you trying to achieve?
    Expression/calculation based on multiple datasources

  • How are you trying to achieve it?
    Multiple hidden queries, expression using $A + $B + $C + $D

  • What happened?
    It was working until last update, now showing “All queries must use the same datasource”

  • What did you expect to happen?
    My expression to show the result = sum of 4 queries

  • Can you copy/paste the configuration(s) that you are having problems with?
    There are 4 queries using count(system_uptime{}), and then I sum all results into one expression.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    Exclamation mark message on the top-left corner of the panel: All queries must use the same .datasource

  • Did you follow any online instructions? If so, what is the URL?

1 Like

I am having same issue

Me too, after updating to v8.2.2

It will be fixed in next v8.2.3