简体   繁体   中英

Vega-Lite / Kibana : How can I make a table that shows calculations between aggregations?

I want to do a data table in kibana like the following: see image

That means, the 2 first columns are the sum of price and quantity and the 3rd column divides both sums to get a ratio. Also I want this to be dynamic to changes in time range.

As far as I've seen getting the ratio is not possible in kibana, but I've noticed that there is a plugin were you can create Vega-Lite graphs in kibana.

I am new both in Vega-Lite and in kibana, so is there an example of code that creates a data table? The Vega-Lite site did not help me a lot...

Thank you!

I believe you could add a scripted field to calculate this ratio and then u can have the column you want:D https://www.elastic.co/guide/en/kibana/current/scripted-fields.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM