Remove aggregated sums that equal to 0 from visualization

[Kibana 7.9.0v]

I've been trying to remove fields from a bar graph in which their sum is 0.

Currently, I am doing a sum aggregation for products sold and displaying it on a bar graph. The sums are correct and the products are correct but the graph shows items of which the sold sum is 0. I just want to see the items of which at least 1 item was sold.

I've tried adding {"min_doc_count": 1} to the JSON input portion of both the Metrics & Buckets sections but an error is brought up. I've also looked into the advanced settings but have found no section for setting the minimum.

Hi, and welcome to the forums! Unfortunately you have very few options for doing this in Kibana today. You basically have these options:

a. If your data is time-based, you can use Timelion and apply a conditional expression to hide portions of the data

b. If your data is not time-based, then you can use Vega to construct any visualization except a table. Vega supports conditional logic as well.

We are aware of the need to add conditionals to Kibana, and there are a few existing issues for it, but this is what we currently offer. You can learn more about Timelion and Vega using the docs on advanced Kibana editors

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