Hi guys,
i'm trying to caclulate the relationship between two values, but i can't get the desired value.
This is my (DSL) _search:
{
"size": 0,
"query": {
"bool": {
"filter": [
{"term": {"h.cat": "order"}}
]
}
},
"aggs": {
"rejects": {
"filter": {
"term": {
"c.order.status": "RJ"
}
}
}
}
}
I would like to show a KPI as:
count(rejects) / count(order) * 100
- so the incidence of rejects on all orders.
I try also with "Bucket Script Aggregation", but I was not able to achieve my goal.
Could you please help me?
Thanks in advance!
Ely