For more information, refer to Templates and variables.
There are two syntaxes:
Example:
[[varname]]
Example:
Example dashboard: InfluxDB Templated Dashboard
If you add a query template variable, then you can write an InfluxDB exploration (metadata) query. These queries can return things like measurement names, key names or key values. For more information, refer to Add query variable.
For example, you can have a variable that contains all values for tag if you specify a query like this in the query variable Query.
You can also create nested variables, sometimes called chained variables.
You can fetch key names for a given measurement.
If you have a variable with key names you can use this variable in a group by clause. This will allow you to change group by using the variable list at the top of the dashboard.
InfluxDB supports the special variable type. This variable allows you to specify any number of key/value filters on the fly. These filters are automatically applied to all your InfluxDB queries.
For more information, refer to Add ad hoc filters.