User Guide Getting Started Help Center Documentation Community Training
Looker
  
English
Français
Deutsch
日本語
Adding Filters to User-Defined Dashboards

The previous tutorials showed how to create a dashboard and edit a dashboard. This tutorial shows how to configure and add filters to your dashboards so that your users can restrict the data displayed in the dashboards.

Adding Dashboard Filters a User Can Change

Filters can be added to a dashboard so that users can narrow the dashboard’s results to the data they are interested in. Adding a filter consists of these major steps:

  1. Create the filter itself, which is what the user will interact with.
  2. Decide which dashboard tiles should “listen” to that filter. If you don’t actively do this, a tile will simply ignore the filter.

To get started, make sure the dashboard is in edit mode and then click Filters in the dashboard toolbar:

This will bring up the Add/Edit Dashboard Filters window:

Next, on the Add/Edit Dashboard Filters window:

  1. Click New Filter to create a new filter. Looker lists the new filter on the left hand side of the filters pop-up. You can drag and drop the filters to control the order in which they appear on the dashboard.
  2. Give your filter a name.
  3. Choose the type of filter you want to create. You are able to create a Date, String, Number or Field filter. The Date, String, and Number types let the user enter any value they like of that type. The Field type lets you choose a specific field from which Looker will create suggestions for the user.
  4. Add a default value if desired. This value will be suggested to the user when they load the dashboard, but they can change it if they like. You can choose a basic default value from the drop-down options, or create a more complex default value based on an advanced match, as explained here.
  5. Decide which tiles the filter should be applied to and turn them on. Then, choose the LookML field to which the value of the filter will be applied.
  6. For tiles based on merged query results, select the query or queries you want to apply the filter to and turn them on, then select the LookML field to which the filter value will be applied.

  7. In the Filters to Update tab, you can make different filters dependent on the selected filter, as described in the following section. To do so:

    • Save your filter, as defined so far.
    • Turn on the switch next to the other filters you want to make dependent on this filter.
  8. In the Customize Filter tab, choose the behavior of your filter:

    • Require a filter value to run this dashboard: The user must enter a filter value before the dashboard can be run. See this section below.
    • Allow multiple filter values: When this is on, the user can select multiple filter values. When this is off, the user is able to select only a single filter value. See this section below.
  9. Save your filter.

If you change field names that serve as filters in your Looks or dashboards, be sure to review the Filters section of your scheduled Looks and dashboards and update the filters as needed to reflect your changes. If a scheduled content delivery includes filters that no longer function (for example, if the referenced field has changed), the scheduled delivery could expose unfiltered data.

Dashboard Filter Default Behavior

By default, a new dashboard filter is turned off for all previously existing tiles on the dashboard. To apply the new filter to one or more tiles, you must turn on each of those tiles under the Tiles to Update tab of the Add/Edit Dashboard Filters window.

By default, a new tile will not be subject to a previously existing filter that was set up before the tile was added to the dashboard. To apply the filter to a new tile, you must edit the tile directly by putting the dashboard into edit mode, selecting Edit Applied Filters on the tile, and turning on the filter toggle.

Dashboard Filters as Drill Results

If your Looker admin has enabled the Dashboards in Drill Menus Labs feature, users can link directly to a dashboard from an Explore drill menu from a field that is used as a filter on that dashboard.

A dashboard will appear in a drill menu in the following situations:

Setting Up Faceted Filters

Dashboard filters of the Field type can be applied to other Field filters. For example, you might have an Airport State filter and an Airport Name filter. One thing you may want to do is update the Airport Name filter based on the Airport State filter:

By doing this, only the airports that are within the chosen state will be suggested to the user:

Requiring a Filter Value

By default, filters do not require values. If a filter that does not require a value is left blank, the data simply isn’t restricted by the filter field. For example, if you have a filter on a State field on a dashboard, if that filter was not given a value, the dashboard would return data for all states.

If a filter does require a value, the dashboard won’t run if the filter is left blank.

You can choose to require that a user enter a value in a filter before they can run the dashboard:

  1. Click on the filter in the Add/Edit Dashboard Filters window.
  2. Click on the Customize Filter tab.
  3. Turn on or off Require a filter value to run this dashboard.
  4. Click Save.

If Require a filter value to run this dashboard is on, whenever a user tries to run the dashboard without entering a value in the required filter:

Limiting the Number of Values

By default, a user can select multiple values for a dashboard filter. You can choose to limit users to a single filter value:

  1. Click on the filter in the Add/Edit Dashboard Filters window.
  2. Click on the Customize Filter tab.
  3. Turn on or off Allow multiple filter values.
  4. Click Save.

When Allow multiple filter values is on, the user has the option to add additional values for a filter:

When Allow multiple filter values is off, there is no option to add a second value for the filter, and the filter’s default value can be either is equal to (for strings and numbers), is on the day (for dates), or matches a user attribute (for strings, numbers and dates):

For location fields, the dashboard filter cannot be set to Allow multiple filter values OFF.

Conclusion

Now that you know how to add filters to your dashboards, go to the next tutorial to learn how to create and save Looks that you can use in tiles on multiple dashboards.

Top