Expression query produce 1 timeserie by grouped by row

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

  • What are you trying to achieve?
    I try to calculate a percent rate by comparing two elasticsearch queries in a expression query.

  • How are you trying to achieve it?

  • I create a table widget
  • I created 2 elasticsearch queries (A and B)
  • they have the same query filter
  • they have both the same “group by” (by terms)
  • they dont have a “time” group by
  • I hide the 2 queries
  • I create a 3rd query (C) of type “expression” ($A/$B) * 100
  • What happened?

It creates me a strange result: for each grouped by value, it is like I have a different timeserie (the table widget display a selector of the “group by” label to display.

  • What did you expect to happen?

I expect to have one single table with all labels and the computed value instead of one selector.
It is strange, because it works with date histogram group by…

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