What's new from Grafana Labsbreadcrumb arrow Substitute template variables in saved queries
What's new from Grafana Labs
What's new from Grafana Labs
Grafana Cloud Available in public preview Enterprise Available in public preview Dashboards and visualizations
Release date: 2026-03-02

Substitute template variables in saved queries

You can now substitute variables when selecting a saved query without modifying the original query.

A saved query with substituted variables

Previously, if a saved query contained variables that weren’t in your dashboard, Grafana displayed a compatibility warning and limited how the query could be reused. With this update, the warning is replaced with a section where you can update the variable (for example, ${job}) inline by mapping the variable to either:

  • A variable in your dashboard
  • A custom value that you enter

Grafana applies your selections to the query before inserting it into the dashboard. However, the substitutions only apply to the query when it’s reused, and the original saved query remains unchanged.

This makes saved queries more portable and reusable in environments where variable names or available values differ between dashboards.

This functionality is also available in Explore for custom values.


Related What's new posts