I would like to create a visualization in Kibana (Metric or Data Table) that would return several values:
"yes" / total which would be 20000 / 74000, so value = 0,2702
"no" / total which would be 54000 / 74000, so value = 0,7298
You can do this with the TSVB visualization type. Select the "metric" tab on top, then use the "filter ratio" aggregation type. It allows you to specify a query for the numerator and denominator - in your case the numerator would be my_field:yes and the denominator *. By adding a second series, you can do the same thing for the no value (the plus button in the top right of the series panel).
That worked, thank you! Could you tell me how the same could be achieved using elasticsearch query? I'd like to get both those results in the same query call.
And also, I'd like to have a possibility of dividing those two results, so something like 0,2702 / 0,7298.
Is that possible?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.