Use and edit variables

Besides chart filters, you can also use dashboard variables in:

  • Data Pipeline formulas and some Data Pipeline steps (Filter, Case statement)
  • Chart titles
  • Text elements
  • Column names (Can be used in both Interactive Mode and SQL Mode. For Interactive Mode, set the label.)

Edit Variables

To edit an existing dashboard variable, open your dashboard settings (by selecting Settings from the dashboard’s sidebar menu) and switch to the Variables tab. You can also get to this tab, by selecting Edit Variable from your variable’s menu options.

From the Variables tab, you can edit the variables’ default, format, and background color.

Edit a dashboard variables from the Settings menu

Edit Filter

Some variables like Dropdowns and Date Sliders are built using a database query and can be further edited with the option of adding Data Pipeline Steps to modify the results. To do this edit, use the Edit Filter option in the variable’s menu option to open up the Data Explorer.

Further edit dashboard variables and filters

Reset Dashboard Values

To reset a dashboard’s variables to their default values, click on the Reset values button below the variable list in the Variables tab.

You can also reset the variables by clicking on the dashboard title on the top left corner of any dashboard.

Click Dashboard title to reset variable values

Troubleshooting

Query log

If you are experiencing any formatting errors related to your dashboard variables, one of the best places to start troubleshooting is the query log. In the query log, you can view how Chartio translates your dashboard variable syntax into a SQL query, and how the query changes when specific values are selected.

For more information on accessing the query log, see our query log documentation.

Executed query

To troubleshoot specific variable values used in a chart, use the Executed query view in the chart’s Data Explorer. Clicking on the Executed query option next to the Run Query button will open up the latest query ran for your chart with the actual variable values added to the query.

Executed SQL query

If your filters aren’t working as expected, see if the values are coming up as expected in the query and try modifying the filter options in your chart before running the query again. This allows you to view how the query results change based on different variable values.