# Remove aggregated sums that equal to 0 from visualization

**URL:** https://discuss.elastic.co/t/remove-aggregated-sums-that-equal-to-0-from-visualization/262271
**Category:** Kibana
**Created:** [January 26, 2021, 7:05pm UTC](https://discuss.elastic.co/t/remove-aggregated-sums-that-equal-to-0-from-visualization/262271 "2021-01-26T19:05:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![thedevelpr](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@thedevelpr](https://discuss.elastic.co/u/thedevelpr)
#### Post date: [January 26, 2021, 7:05pm UTC](https://discuss.elastic.co/t/remove-aggregated-sums-that-equal-to-0-from-visualization/262271/1 "2021-01-26T19:05:24Z")

</div>

[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.

---

<div class="post-metadata">

### Author: ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)
#### Post date: [January 26, 2021, 8:52pm UTC](https://discuss.elastic.co/t/remove-aggregated-sums-that-equal-to-0-from-visualization/262271/2 "2021-01-26T20:52:45Z")

</div>

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](https://www.elastic.co/guide/en/kibana/master/add-panels-with-advanced-editors.html)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 23, 2021, 8:53pm UTC](https://discuss.elastic.co/t/remove-aggregated-sums-that-equal-to-0-from-visualization/262271/3 "2021-02-23T20:53:02Z")

</div>

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