Single stat value changes depending on if in "edit panel" or in dashboard

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

  • What are you trying to achieve?
    calculating a percentage from 2 subqueries, where output is (A-B)/A, where A and B are the results of 2 subqueries

  • How are you trying to achieve it?
    in query

  • What happened?
    i get the expected result when i am in the “edit panel” and sometimes when i switch back to dashboard. but after a moment, the value changes to something completely different and incorrect.

  • What did you expect to happen?
    to have the correct value shown in the dashboard.

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    where do i find this?

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

What datasource are you querying? Can you share some screenshots of your data and the issue? Are you using transformations to achieve your goal?