diff --git a/public/app/plugins/datasource/elasticsearch/query_def.ts b/public/app/plugins/datasource/elasticsearch/query_def.ts index 56720e80847..43295c6a0fb 100644 --- a/public/app/plugins/datasource/elasticsearch/query_def.ts +++ b/public/app/plugins/datasource/elasticsearch/query_def.ts @@ -246,7 +246,7 @@ export function getMovingAvgSettings(model: any, filtered: boolean) { export function getOrderByOptions(target: any) { const metricRefs: any[] = []; _.each(target.metrics, metric => { - if (metric.type !== 'count') { + if (metric.type !== 'count' && !isPipelineAgg(metric.type)) { metricRefs.push({ text: describeMetric(metric), value: metric.id }); } });