# Visualization Exclude on numeric field

**URL:** https://discuss.elastic.co/t/visualization-exclude-on-numeric-field/191802
**Category:** Kibana
**Created:** [July 23, 2019, 12:07pm UTC](https://discuss.elastic.co/t/visualization-exclude-on-numeric-field/191802 "2019-07-23T12:07:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Matheu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matheu/32/48655_2.png) [@Matheu](https://discuss.elastic.co/u/Matheu)
#### Post date: [July 23, 2019, 12:07pm UTC](https://discuss.elastic.co/t/visualization-exclude-on-numeric-field/191802/1 "2019-07-23T12:07:50Z")

</div>

I am trying to product a visualization in the Kibana UI which shows a count. The data is about request made to our service, so we have a "responseCode" field of type long. This will hold the http response code, eg  
200  
201  
400  
500  
etc

The visualization I want to create is to count errors (bad requests) so I want to exclude all response codes, for example from the 200-299 range.

How do I do this..?

I have tried:  
-responseCode:[200 TO 299]  
-responseCode:[200, 201, 299]  
and various others...

 ![kibana%20error](https://us1.discourse-cdn.com/elastic/original/3X/3/6/36af85c215b4fdc2b2b7156e5a2ada6face6217d.png)

---

<div class="post-metadata">

### Author: ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)
#### Post date: [July 23, 2019, 2:57pm UTC](https://discuss.elastic.co/t/visualization-exclude-on-numeric-field/191802/2 "2019-07-23T14:57:31Z")

</div>

Hey @Matheu,

Can you exclude these using a filter at the visualization level instead of at the aggregation level? Something like this?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/7/8720c070f7f9a4409d5e545b91b198dc7f918227.png)

---

<div class="post-metadata">

### Author: ![Matheu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matheu/32/48655_2.png) [@Matheu](https://discuss.elastic.co/u/Matheu)
#### Post date: [July 23, 2019, 4:03pm UTC](https://discuss.elastic.co/t/visualization-exclude-on-numeric-field/191802/3 "2019-07-23T16:03:01Z")

</div>

But won't that effect every visualization ? I am just looking to exclude within this single visualization...

---

<div class="post-metadata">

### Author: ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)
#### Post date: [July 23, 2019, 4:08pm UTC](https://discuss.elastic.co/t/visualization-exclude-on-numeric-field/191802/4 "2019-07-23T16:08:41Z")

</div>

Nope, you can specify this when creating the visualization, and it should only impact that single viz. We're not specifying the filter at the dashboard level

---

<div class="post-metadata">

### Author: ![Matheu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matheu/32/48655_2.png) [@Matheu](https://discuss.elastic.co/u/Matheu)
#### Post date: [July 23, 2019, 4:14pm UTC](https://discuss.elastic.co/t/visualization-exclude-on-numeric-field/191802/5 "2019-07-23T16:14:25Z")

</div>

Ok, I see....

Thanks very much for your help.....

---

<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: [August 20, 2019, 4:14pm UTC](https://discuss.elastic.co/t/visualization-exclude-on-numeric-field/191802/6 "2019-08-20T16:14:32Z")

</div>

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