How to divide values using Grafana?

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

Hi Tokash,

I use Grafana with InfluxDB. Here’s a partial screenshot of simple division performed on a Grafana metric.

HTH.

Regards,

Bill

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

Hi Torkel!
Thanks for the answer. Maybe it’s not the answer that i would like to hear :slight_smile: but anyway, thank you so much! Now everything is clear.

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!

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?