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?