I'm using Elasticsearch 7.5 I want calculate percentage in each buckets

{
"aggs":{
"country":{
"terms":{
"field":"country.keyword",
"size":10000
},
"aggs":{
"videocount":{
"avg":{
"field":"video_count"
}
},
"viewcount":{
"avg":{
"field":"view_count"
}
}
}
}
}
}

bu i,m get back like this

{
"key": "MY",
"doc_count": 28,
"videocount": {
"value": 247.89285714285714
},
"viewcount": {
"value": 41844586.03571428
}
},

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