Rate 's average?

Hello,

I've two lines registered in ES :
id - A - B - C
1 - 100 - 0 - 0
2 - 10 - 5 - 5

This is calculate the rate (A - B) / (B) :
1 => (100 - 0) / 100 = 1
2 => (10-5) / 10 = 0.5

With kibana, I can't calculate the average of this global rate...

If I use metric, I just got 0.75 ((1.00+0.5) /2) but the result I expect is 0.9545 explained like this :
(sum(A) - sum(B) ) / sum(A) = (110 - 5) / (110) = 0.9545

How can I get the result I expect with metrics ?
Thx a lot for the help !

You can use scritped fields to create a field that is computed at query time.

Hey Nathan,

I already try, I've created one scripted field to calculate my rate but it always calculate line by line rate, not a total rate. I've always have 0.75 rate instead of my 0.9545 expected.

I've found this https://github.com/ommsolutions/kibana_ext_metrics_vis . With this plugin I can calculate my rate but I'had to change my kibana version (downgrade to 5.6.5) and the rate seems can't be displayed on other visualizations like chart

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.