Order by calculated metric

Hi there

At the moment i work on a visualization that isn't a date histogram (so timelion seems not to be the right thing).
The target is to have a bar chart which shows functions in our software that have the most user impact.

User impact is defined as a measurment of the lenght of the call together with how many times this function is used.

Therefore i want to create a bar chart which shows the user impact or the average performance per function. But what's important it has to be ordered by the user impact.

What I didn't find out so far is, if it is possible to have a calculated metric where you calculate two values of a aggregation like an unique count and an average multiplied.

Does someone know how to do that in Kibana? We use Version 5.4.3

Best regards

Hi Dominik,

unfortunately you cannot multiply the result of one metrics aggregation (e.g. average) to the result of another metrics aggregation (e.g. count - though technically not an aggregation, but that's not important in that case).

Depending on how your data looks, there might be other ways. So if you would have one document per "call" containing the length as a numberic value, and your impact should just be average(calls.length) * count(calls) you would basically end up with the same result if you just calculate the sum of all calls.length as an impact value. That way you could place your terms aggregation on the functions field on the x-axis of your barchart and just use a sum on the length field on the y-axis.

But if you have a kind of custom impact calculation, that is not really just average times documents (which ends up pretty much the same as the sum) I am sorry to tell you it's not possible at the moment.

Hope I could help you a bit.

Best,
Tim

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