Grafana Cloud Enterprise
Last reviewed: August 21, 2026

Looker template variables

Use template variables to create dynamic, reusable dashboards with the Looker data source.

Before you begin

Before you create a variable, ensure you have:

Supported variable types

The Looker data source supports the following Grafana variable types:

Variable typeSupported
QueryYes
CustomYes
Data sourceYes

Query variable types

When you create a query variable with the Looker data source, select one of the following Query Type options:

Query typeReturnsVariable value
LookML modelsThe list of LookML models the data source can access.The model name.
LookML models exploresThe list of explores for a selected model.The explore name.
LookML dimension valuesThe values of a selected dimension for a model and explore, optionally filtered by a filter expression.The dimension value.
LooksThe list of saved Looks the data source can access.The Look ID, with the Look title shown as the display text.

Create a query variable

To create a query variable:

  1. On the dashboard, click Edit to enter edit mode, then go to Options > Variables.
  2. Click Add variable.
  3. Enter a Name for the variable.
  4. Select Query as the variable type.
  5. Click Open variable editor.
  6. Select the Looker data source.
  7. Select a Query Type and complete the fields it requires.

LookML models

The LookML models query type takes no additional fields. It returns the models available to the data source, so you can drive other variables or queries by model.

LookML models explores

The LookML models explores query type requires a LookML Model. It returns the explores available within the selected model.

LookML dimension values

The LookML dimension values query type returns the distinct values of a dimension. Complete the following fields:

FieldDescription
LookML ModelThe model that contains the explore.
LookML ViewThe explore that contains the dimension.
LookML DimensionThe dimension whose values populate the variable.
Filter ExpressionAn optional Looker filter expression to restrict the returned values.

Looks

The Looks query type takes no additional fields. It returns the saved Looks available to the data source. The variable value is the Look ID and the display text is the Look title, so you can build a variable that selects a Look by name.

Create dependent variables

You can chain variables so that one updates based on another. When you build a LookML models explores variable, set its LookML Model to a model variable, such as ${model}. The explore list then updates whenever the selected model changes.

Use variables in queries

Caution

Referencing template variables inside a Looker panel query isn’t supported. Although the query builder drop-downs may list your dashboard variables, the data source doesn’t substitute them when the query runs, so Looker receives the variable reference unresolved. This applies to the builder, the LookML JSON body, and the filter expression.

You can still use Looker variables in the standard Grafana ways:

  • Repeat a panel or row for each selected value.
  • Reference the values in panel titles, text panels, or queries to other data sources.

For more information, refer to Grafana template variables.

Next steps