diff --git a/public/app/features/correlations/Forms/QueryEditorField.tsx b/public/app/features/correlations/Forms/QueryEditorField.tsx index a6bd902b3a5..bb199d6bb04 100644 --- a/public/app/features/correlations/Forms/QueryEditorField.tsx +++ b/public/app/features/correlations/Forms/QueryEditorField.tsx @@ -81,7 +81,11 @@ export const QueryEditorField = ({ dsUid, invalid, error, name }: Props) => { if (datasource) { runRequest(datasource, transaction.request).subscribe((panelData) => { - if (!panelData || panelData.state === 'Error' || panelData.series.length === 0) { +if ( + !panelData || + panelData.state === 'Error' || + (panelData.state === 'Done' && panelData.series.length === 0) + ) { setIsValidQuery(false); } else if ( panelData.state === 'Done' &&