Visualizing the ratio of a boolean

I'm using the sample flights data from the Kibana tutorials, Each log has a 'carrier' field (one of 4 string values), and a 'cancelled' field (boolean)

I want to visualize the percentage of cancelled flights per carrier.
I tried using a table and do the initial buckets according to carrier and then sub bucket according to cancelled, with a count metric i get the amount of cancelled and not-cancelled flights per carrier

however i can't find a way to add the cancelled/not-cancelled ratio
I read about painless scripting language but it seems you can use it to access document values but not my calculated metrics

@Michael_Be_eri,

that can be done using bucket scripts. There are only supported in the time series visual builder-visualization.

This is a known outstanding improvement for Kibana: https://github.com/elastic/kibana/issues/4707

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