I have installed grafana 8.0.6. I have created a Stat panel with ElasticSearch data source with the following query. After creating Bucket script when I tried to use in order by option with reference to bucket script then It is giving below error:
“reason”: “Invalid aggregation order path . The provided aggregation  either does not exist or is a pipeline aggregation and cannot be used to sort the buckets.”
Can anyone please help me with this? As my requirement is to order data in descending order based on the bucket script. Is this an issue on grafana or I am doing something wrong.