# Deviation of 20% or more of the average value

**URL:** <https://discuss.elastic.co/t/deviation-of-20-or-more-of-the-average-value/214768>\
**Category:** Kibana\
**Created:** [January 13, 2020, 7:06am UTC](https://discuss.elastic.co/t/deviation-of-20-or-more-of-the-average-value/214768 "2020-01-13T07:06:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tamjid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tamjid/32/60685_2.png) [@tamjid](https://discuss.elastic.co/u/tamjid)\
**Post date:** [January 13, 2020, 7:06am UTC](https://discuss.elastic.co/t/deviation-of-20-or-more-of-the-average-value/214768/1 "2020-01-13T07:06:28Z")

</div>

ES and Kibana version: 6.8  
I have some document in an index like (only showing `_source` field for simplicity):

```
{
    "name": "unique1",
    "amount": 200
},
{
    "name": "unique1",
    "amount": 100
},
{
    "name": "unique1",
    "amount": 150
},
{
    "name": "unique2",
    "amount": 300
}

```

**For each name** , I want to find all the amounts that **deviates** more than or equal to 20% from their avg. In the example above, I want to see the amount 200 and 100 because that deviates more than 20% of their avg, which is 150.

How can I create a data table with these constraints?

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [February 6, 2020, 3:24pm UTC](https://discuss.elastic.co/t/deviation-of-20-or-more-of-the-average-value/214768/2 "2020-02-06T15:24:27Z")

</div>

Hi @tamjid  
I'm sorry for the very late reply, was you able to solve the issue by your own?  
If so, it will be great if you can post the solution there, if not I'm more then happy to help you on this

Thank you

---

<div class="post-metadata">

**Author:** ![tamjid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tamjid/32/60685_2.png) [@tamjid](https://discuss.elastic.co/u/tamjid)\
**Post date:** [February 6, 2020, 3:44pm UTC](https://discuss.elastic.co/t/deviation-of-20-or-more-of-the-average-value/214768/3 "2020-02-06T15:44:38Z")

</div>

Hi @markov00, thank you for your reply. I' de very much appreciate your help on this as it is not resolved yet.

Thanks

---

<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:** [March 5, 2020, 3:56pm UTC](https://discuss.elastic.co/t/deviation-of-20-or-more-of-the-average-value/214768/4 "2020-03-05T15:56:00Z")

</div>

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