tokash
October 4, 2017, 9:07am
1
Hello!
I’m curious about one thing, can I divide values using Grafana?
I found on InfluxDB developer site info about doing mathematical operations using InfluxDB, however, i’m also found some info that this is not possible. (Mathematical Operators | InfluxDB OSS 1.3 Documentation )
So, question is what is the true?
I have tried in so many ways configure that but nothing work. Is it possible? Can i divide 2 values using Grafana?
1 Like
tpp
October 4, 2017, 2:14pm
2
Hi Tokash,
I use Grafana with InfluxDB. Here’s a partial screenshot of simple division performed on a Grafana metric.
HTH.
Regards,
Bill
torkel
October 4, 2017, 7:09pm
3
you can use math expressions in InfluxDB select clause like select mean(“value”)*100
but that is about it. you cannot divide one query against the result of another. InfluxDB query language is very limited in its capability (compared to Graphite)
1 Like
tokash
October 5, 2017, 1:59pm
4
Hi Torkel!
Thanks for the answer. Maybe it’s not the answer that i would like to hear but anyway, thank you so much! Now everything is clear.
shepoil
January 22, 2019, 10:01pm
5
If it’s FROM
the same thing you can.
SELECT (last(A) / last(B)) * 100 FROM "C"
or
SELECT (count(A) / count(B)) FROM "C"
2 Likes
That worked for me
Thanks!
cucac
September 4, 2020, 12:43pm
7
what should I do if it’s 2 different FROMs like
SELECT last(A) FROM "B" + last(A) FROM "C"`
If not, is there a way to do that?