Display the average of a field by grouping another field

I have my data indexed to ElasticSearch and I have created a data source to connect to my index pattern of Elastic Search from Grafana.

My data looks something like :
Operation Name Execution Time (ms)
Operation 1 200
Operation 2 1050
Operation 3 100
Operation 1 2036
Operation 1 100

I want to display a Table Panel in Grafana as below.

Operation Name Avg TimeTaken
Operation 1 …
Operation 2 …
Operation 3 …

I have managed to display a table panel with Operation name & count. But I want to look at a field and calculate avg of it by grouping based on Operation name.

Can someone help me in achieving this