# Kibana 7.0.0 - Pie Visualisation excluding results if results value \< x% (less then x%)

**URL:** <https://discuss.elastic.co/t/kibana-7-0-0-pie-visualisation-excluding-results-if-results-value-x-less-then-x/193999>\
**Category:** Kibana\
**Created:** [August 6, 2019, 11:37am UTC](https://discuss.elastic.co/t/kibana-7-0-0-pie-visualisation-excluding-results-if-results-value-x-less-then-x/193999 "2019-08-06T11:37:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Datakids](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/datakids/32/39622_2.png) [@Datakids](https://discuss.elastic.co/u/Datakids)\
**Post date:** [August 6, 2019, 11:37am UTC](https://discuss.elastic.co/t/kibana-7-0-0-pie-visualisation-excluding-results-if-results-value-x-less-then-x/193999/1 "2019-08-06T11:37:30Z")

</div>

Hi there,

I need your advice how to manage this case with an aggregated result.  
I have a simple pie and I wanted to exclude results \< 1% in order to have only a pie with results \> 1%:  
I tried a few ways with terms aggregation well as dsl query but failed so far.  
Is there a way to archive this in Kibana ?

```
{
  "aggs": {
    "5": {
      "terms": {
        "field": "Role.keyword",
        "size": 5,
        "order": {
          "_count": "desc"
        }
      },
      "aggs": {
        "4": {
          "terms": {
            "field": "API.keyword",
            "size": 50,
            "order": {
              "_count": "desc"
            }
          }
        }
      }
    }
  },
  "size": 0,
  "_source": {
    "excludes": []
  },
  "stored_fields": [
    "*"
  ],
  "script_fields": {},
  "docvalue_fields": [
    {
      "field": "@timestamp",
      "format": "date_time"
    },
    {
      "field": "Date",
      "format": "date_time"
    },
    {
      "field": "Time_a",
      "format": "date_time"
    },
    {
      "field": "Time",
      "format": "date_time"
    }
  ],
  "query": {
    "bool": {
      "must": [
        {
          "match_phrase": {
            "Stock.keyword": {
              "query": "A11"
            }
          }
        },
        {
          "range": {
            "Time": {
              "format": "strict_date_optional_time",
              "gte": "2018-12-31T23:00:00.000Z",
              "lte": "2019-12-31T22:59:59.999Z"
            }
          }
        },
        {
          "match_phrase": {
            "Stock.keyword": {
              "query": "A11"
            }
          }
        }
      ],
      "filter": [
        {
          "match_all": {}
        },
        {
          "match_all": {}
        }
      ],
      "should": [],
      "must_not": []
    }
  }
}

```

Thanks and Regards

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [August 22, 2019, 6:37pm UTC](https://discuss.elastic.co/t/kibana-7-0-0-pie-visualisation-excluding-results-if-results-value-x-less-then-x/193999/2 "2019-08-22T18:37:09Z")

</div>

I don't think it is possible to exclude aggregation results in the visualizations in Kibana.

If you are feeling intrepid, it might be possible to create a [custom Vega visualization](https://vega.github.io/vega/examples/donut-chart/) that excludes aggregation results.

---

<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:** [September 19, 2019, 6:37pm UTC](https://discuss.elastic.co/t/kibana-7-0-0-pie-visualisation-excluding-results-if-results-value-x-less-then-x/193999/3 "2019-09-19T18:37:12Z")

</div>

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