Hi,
I have a field in Kibana which would say if my ticket is passed or failed.
has_passed is the field.
I wanna write a scripted_field based on this value.
> target % = (count(has_passed='passed')/count(total)) *100
how do i do this?
Hi,
I have a field in Kibana which would say if my ticket is passed or failed.
has_passed is the field.
I wanna write a scripted_field based on this value.
> target % = (count(has_passed='passed')/count(total)) *100
how do i do this?
Hi @katara,
unfortunately, scripted fields are property of the document and not the index. You cannot use scripted field for storing aggregated data. Example: if you have document with price
and discount_price
you can calculate the % of the discount, but you cannot calculate average of price in the whole index.
What might be helpful for your example is to create TSVB visualization with filter ratio. Check out the example here: https://www.elastic.co/blog/how-to-display-data-as-a-percentage-in-kibana-visualizations
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
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.