# HOW-TO: negate an aggregation

**URL:** <https://discuss.elastic.co/t/how-to-negate-an-aggregation/36054>\
**Category:** Kibana\
**Created:** [December 1, 2015, 1:49pm UTC](https://discuss.elastic.co/t/how-to-negate-an-aggregation/36054 "2015-12-01T13:49:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nskalis](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nskalis](https://discuss.elastic.co/u/nskalis)\
**Post date:** [December 1, 2015, 1:49pm UTC](https://discuss.elastic.co/t/how-to-negate-an-aggregation/36054/1 "2015-12-01T13:49:18Z")

</div>

hi guys,

could you please advise on how to negate an aggregation ?  
for example, how can i find the documents that the `next_hop` does not belong to the IP v4 range aggregation ?

 ![](https://us1.discourse-cdn.com/elastic/original/2X/0/04d34443e5fe5983e12a67b3303515f8ee95cdce.png)

Nikos

---

<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:** [July 6, 2017, 2:07pm UTC](https://discuss.elastic.co/t/how-to-negate-an-aggregation/36054/2 "2017-07-06T14:07:44Z")

</div>


