To create a global filter, first select Add filter from your dashboard view, then Global filter from the dropdown menu.
Ensure you map your global filters to all your charts. This is not an automatic process. To use a global filter, you must include a query parameter in the SQL of your chart, enable the global filter in the widget composer, and select a runtime value for the parameter in the global filter dialog. See the query pro guide to learn how to edit your SQL if you need to incorporate a query parameter.
You can quickly change the insights provided by your SQL with customized global filters.
The Create a global filter dialog opens. Creating a global filter follows the same process as creating an insight with SQL. First, select a database (insights data model) to query, then input your custom SQL in the Query Editor, and finally select the run icon ().
You must include an ID and a value when you create a global filter. The sample values allow you to execute the SQL statement and build the chart. Note that the sample values you provide when composing your statement are replaced by the actual values you select for the date or global filter at runtime.
After successfully running the query, the results tab displays the results. Select Next.
The final step of the global filter creation workflow requires you to add a label for your filter. Add a label to the Filter label text field and select a filter type from the dropdown box.
Only the Combo box filter type option is currently supported.
Finally, select Select to return to your dashboard view.
Enable the global filters in every chart you create. This ensures that the values you choose as a global filter to reflect in all of your charts.
After creating your global filter for your dashboard, the toggle for that global filter becomes available as part of the widget composer.
Ensure that the global filter parameter is included in the SQL of each insight.
To open the Filters dialog that lists all of your custom filters, select the filter icon () on the left of your dashboard. Next, to apply the effects on your dashboard insights, choose an option from the dropdown menu of your global filter then select Apply.
To clear all of your custom global filters, select Clear all from the Filters dialog.