I would like to remove the value "0" or null from the table. In the table, I have implemented serial difference aggregation but it shows all the value which includes 0 and null. I would like to exclude this.
Thank you in advance.
Hi, unfortunately, it's not possible at the moment in Kibana (except for Vega, but it's not trivial). There's a popular feature request you can upvote about this issue: Add bucket_selector aggregation to visualizations · Issue #17544 · elastic/kibana · GitHub
Until it becomes available, you could to use raw query DSL - example below:
POST sample_data_ecommerce/_search
{
"size": 0,
"aggs": {
"by_country": {
"terms": {
"field": "category.keyword",
"size": 10,
"order": {
"sum_agg": "desc"
}
},
"aggs": {
"sum_agg": {
"sum": {
"field": "price.keyword"
}
},
"bucket_selector_agg": {
"bucket_selector": {
"buckets_path": {
"sum_agg": "sum_agg"
},
"script": "params.sum_agg > 0" <---
}
}
}
}
}
}
then you could visualize it in Vega, but it's not trivial.
@Marta_Bondyra Thank you...
I would like to suggest the developer to check that why we can't able to sort the data by metrics of serial difference. its strange?
Again thanks for your solution....
© 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.