Grafana version: * Grafana v8.2.7 (d2cccfe91e), self-hosted Grafana Under Linux OS. Data Source Elastic Search Version > 7.x
Issue:
Under variable templates I am able to pass variables to 2 Queries without any problem and Grafana renders the time series as intended. When I want to do a math operation under expressions between the results of Query A and Query B I am getting results. But I get not results if I group each query by the same variable. I do not see any errors.
An example of math expression 100*($A/$B). . A=Query A. B=Query B. A and B are numerical values.
Any idea?
is this is supported? Or
is there any trick to make it work?
I tried multiple ways without success.
Your guidance will be appreciated.
Thanks for the hint Mattabrams!
Server side expressions work fine except when results are aggregated by @timestamp plus one or more than one variable template.
I have not uses transforms to do math operations between the results of 2 queries. Not sure if transforms can do this.
Using transforms is another solution that works but it does not support dynamic variables passed to the aggregation group by. To make it work you have to hardwire each result in the transform. It defeats the purpose of variables and dynamic dashboards.
I would prefer expressions if it works under the scenario I need. It is straight forward and you can add any query results…
I will be great if this improvement is implemented. Not sure if this issue was addressed in the newer versions of Grafana.