Operation on sum aggregation output


(baddy) #1

I want to create pie chart in which first i need sum in metric aggregation and after that i need to perform some conversion operation on output of sum.

Is it possible to do operation on output of sum aggregation in kibana?


(Tim Sullivan) #2

Is it possible to do operation on output of sum aggregation in kibana?

No, in Kibana, a single-value metric aggregation such as sum is as computed as it will get. Especially for non-timebased information like you'd represent in a pie chart.

Just curious though, if you could do this directly in an Elasticsearch query using something like bucket script aggregation or scripted metric aggregation, what would the query look like?


(baddy) #3

hey @tsullivan
if i wrote elasticsearch query for this,
then is it possible to create visualization based on that query?


(Tim Sullivan) #4

Hi, currently that is only possible if you create a custom visualization plugin.

We have a blog post on how to do this at: https://www.elastic.co/blog/developing-new-kibana-visualizations

However, that information is a bit outdated for now. I have asked others in the team and they suggest referencing the plugin functional tests: https://github.com/elastic/kibana/tree/master/test/plugin_functional


(system) #5

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