Hello Team,
I am trying to take a percentage value using two fields in data table visualization , though Data tables doesn't support bucket script or Math ,i am trying to write my aggregation query inside Advanced option
Below is the query which i am trying to put in Advanced option
{
"aggs": {
"dentination_wise": {
"terms": {
"field": "CALLED_NUMBER_COUNTRY_ABBR.keyword",
"size": 20
},
"aggs": {
"sumofin": {
"sum": {
"field": "INCOMING_TRUNK_PRESENT"
}
},
"sumofcs": {
"sum": {
"field": "CALL_ANSWER_STATUS"
}
},
"percentage": {
"bucket_script": {
"buckets_path": {
"my_var1": "sumofcs",
"my_var2": "sumofin"
},
"script": "params.my_var1 / params.my_var2*100"
}
}
}
}
}
}
But I am getting an Internal Server Error, Is it something not supported by Elasticsearch, What are the other option to take out percentage value then? except Visual Builder. Seeking your help ![]()
Thanks
Ramya