Control | Description | Appearance | Control works with the following Data Types |
---|
MULTIPLE SELECTION FILTER TYPES | Button Group | This type of filter is useful for giving viewers a curated set of limited options. Up to 30 options can be curated in the Values setting. If no values are selected, the first 30 values from the database are shown.
A button is colored once selected. | | string, number, tier, zipcode, yes/no, distance, duration | Checkboxes | Like a button group but with a slightly different design, this type of filter is useful for giving viewers a curated set of limited options. Up to 50 options can be curated in the Values setting. If no values are selected, the first 50 values from the database are shown. | | string, number, tier, zipcode, yes/no, distance, duration | Tag List | A combination of drop-down and checkbox filters. The drop-down options can be curated in the Values setting or all options can be surfaced from the database.
Viewers can expand the drop-down by clicking on the chevron. | | string, number, tier, zipcode, distance, duration | Range Slider | Slider range min and max can be set in the Settings tab of the filter configuration window.
Viewers can set the filter value range by adjusting both ends of the slider. | | number, distance, duration | SINGLE SELECTION FILTER TYPES | Button Toggles | This type of filter is useful for giving viewers a curated set of limited options. Up to 30 options can be curated in the Values setting. If no values are selected, the first 30 values from the database are shown.
A button is colored once selected. | | string, number, tier, zipcode, yes/no, distance, duration, parameter | Radio Buttons | Like a button toggle but with a slightly different design, this type of filter is useful for giving viewers a curated set of limited options. Up to 50 options can be curated in the Values setting. If no values are selected, the first 50 values from the database are shown. | | string, number, tier, zipcode, yes/no, distance, duration, parameter | Drop-down Menu | The drop-down options can be curated in the Values setting or all options can be surfaced from the database.
Viewers can expand the drop-down by clicking on the chevron and then either selecting an option from the drop-down or typing in the box to narrow the drop-down options. Viewers can also select Any value. | | string, number, tier, zipcode, yes/no, distance, duration, parameter | Slider | Slider min and max can be set in the Settings tab of the filter configuration window.
Viewers can set the filter value by adjusting the right end of the slider. | | number, distance, duration | DATES AND TIMES FILTER TYPES | Single Day | Viewers can expand to see the calendar by clicking on the date, and select a new day. | | date and time Info |
---|
The single day control can be used with most timeframes and time-based types, but viewers can only select single dates with this type of control. |
| Date Range | Viewers can expand to see the calendar by clicking on the date range, and select a new date range. | | date and time Info |
---|
The single day control can be used with most timeframes and time-based types, but viewers can only select single dates with this type of control. |
| Timeframes | Viewers can select from a set of timeframes built into Looker or create their own custom timeframes by clicking the Custom tab. See the Viewing Dashboards (Beta) documentation page to see the full range of timeframe options for a Timeframes filter.
Timeframes options such as Last 7 Days include the current day. For a timeframe that excludes the current day, select Advanced from the control drop-down and configure the value using complete days.
Viewers can expand to see the timeframe options by clicking on the timeframe. | | date and time Info |
---|
The single day control can be used with most timeframes and time-based types, but viewers can only select single dates with this type of control. |
| OTHER FILTER TYPES
| Advanced | See the Using Advanced Filters section to learn more about advanced filters. | | string, number, tier, zipcode, yes/no, distance, duration, location, parameter | *Note about Date and Time Data: Some timeframes and time-based types are interpreted as different data types when Looker is selecting control options for them. Two examples are the yesno timeframe, which is interpreted as a yesno data type, and therefore has the control options available to the yesno type; and the hour_of_day timeframe, which is interpreted as a number data type, and therefore has the control options available to the number type. |
Using Advanced FiltersAn advanced filter can be applied to all types of data and provides some additional flexibility in the filter conditions you can set up. To create an advanced filter, make sure you have selected Advanced in the Control field of the filter configuration window. The Configure Default Value field populates with appropriate filter condition options for the type of data you’re filtering. For example, the filter below is filtering on distribution center name, which is a string data type, so the filter condition options include is, contains, starts with, and so on.
Filters on other types of data, such as number or date types, will display different condition options. Once you’ve selected your filter condition option, you can select a value from the drop-down to the right, which is populated with values from your database. Or, you can type a value to receive a suggestion.
You can also enter a value yourself and click Create “value” to create a value.
You can click the + next to your filter to add new conditions to the filter, which will be added as either OR conditions or AND conditions, depending on the types of conditions and values. To remove a condition, click the X next to that condition.
Advanced Filters, Dates, and TimesWhile there are several filter controls that allow filtering on dates, you can also use advanced filters with dates. Among other things, using advanced filters allows users to select “complete” ranges that do not include the current time period, by selecting complete days, complete weeks, and so on, in the condition options. This is unlike the timeframe filter control, which includes the current time period.
Advanced filters also allow users to select time values, such as hours, minutes, seconds, and so on.
Matches a User AttributeAdvanced filters also give you the option to select matches a user attribute. This allows you to set filters that change dynamically based on dashboard viewers’ user attributes. See the Filtering and Limiting Data documentation page for more information.
Matches AdvancedThe final option in the Configure Default Value option drop-down is matches advanced. With this option selected, you can enter a Looker filter expression to customize a filter beyond the options provided in the options drop-down.
User attributes can also be referenced in matches advanced filters, using the syntax
{{ _user_attributes['name_of_your_attribute'] }} .
Displaying Dashboard (Beta) FiltersTo set the way a filter displays, make sure your dashboard is in edit mode and select the style of display in the Location field of the filter configuration window. Dashboard (beta) filters can be displayed in the following ways: - Inline: The filter is displayed directly in the top bar of the dashboard.
- Popover: A summary value appears in the top bar of the dashboard; click the value to see the full filter.
- Overflow: A More button appears in the top bar of the dashboard with a numeric indicator of the number of overflow filters; click the button to see the overflow filters and their values.
If all filters are displayed in the overflow position, the More button will instead read Filters:
Generally, we recommend that important or frequently used filters be displayed as inline or popover, and less frequently used filters be displayed as overflow.
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 and that filter was not given a value, the dashboard returns data for all states. If a filter does require a value, the dashboard won’t run until you select a filter value.
Additionally, schedules that have no value selected for required filters will display no results upon delivery. To require that a user enter a value in a filter before they can run the dashboard: - Make sure the dashboard is in edit mode.
- Open the filter configuration window for the filter, either by adding a new dashboard (beta) filter, or by editing an existing dashboard (beta) filter.
- Click the arrow to the left of the Additional options heading to reveal the additional options.
- Select the Require a filter value checkbox.
- Click Update to save your change.
The Require a filter value checkbox simply requires that viewers select any value. To restrict the values a viewer is able to select, set the allowed values in the Values field of the filter configuration window.
Setting Up Linked Filters
warning In original dashboards, this feature is called faceted filters.
Dashboard (beta) filters can be linked so that the filter value options for one filter are narrowed based on the filter value or values selected for a different filter on the same dashboard. For example, you can link a dashboard filter for City to a separate filter for State. The filter value options for City will change based on the state or states selected in the State filter. The screenshot below shows that when Texas is selected in the State filter, the value options drop-down for the linked City filter shows only cities in Texas:
Once you select a filter value for State, a link icon appears above the City filter. If you hover over the link icon, a box explains that the value options for that filter have been narrowed by the State filter.
You can go further and link a Zip filter to the City and State filters, narrowing the value options for Zip depending on the city and state selected:
If you link filters and your data contains no values for a “child” filter (the filter to be narrowed), given the values selected in the “parent” filter (the filter that narrows the child filter’s options), viewers will see a No matches found message for the child filter. For example, if your data contains no cities in Texas, the filters would look like this:
Linked filters work in one direction, from parent to child. If you make a selection in a child filter, it will not affect the filter value options presented to you for the parent filter.
How to Link FiltersWhen you are linking filters, any filter can be used as the “parent” filter (the filter that narrows another filter’s options), but the “child” filter (the filter to be narrowed) should use a field of type string , commonly used for words or phrases, or type zipcode , commonly used for zip codes. If there is only one filter on the dashboard, the ability to link filters is disabled. To link one filter to another: - Make sure the dashboard is in edit mode.
- Open the filter configuration window for the “parent” filter, either by adding a new dashboard (beta) filter, or by editing an existing dashboard (beta) filter.
- Click the arrow to the left of the Additional options heading to reveal the additional options.
- Select the Select filters to update when this filter changes checkbox.
- Click the field box to reveal a drop-down with the other filters present on the dashboard.
- Select the
string or zipcode filter or filters you would like to link to this filter.
- Click Update to save your change.
Moving and Repositioning Dashboard (Beta) Filters
Once placed on a dashboard (beta), filters can be moved or repositioned by: - Entering edit mode on the dashboard.
- Hovering over the filter to display the filter’s six-dot icon. The six-dot icon appears at the top left of the filter.
- Clicking and holding on the six-dot icon, and dragging the filter to the position you desire.
This drag and drop method can be used to reposition inline and popover filters, reconfigure which filters are displayed as overflow, and reposition filters within the More button drop-down. If no filters are currently displayed as overflow, an empty More button temporarily appears while you are dragging a filter. You can move the filter over the More button to place the filter in overflow. If you do not place the filter in overflow, the More button disappears once you release your click.
If cross-filtering is enabled on a dashboard (beta), cross-filters cannot be repositioned using drag and drop, and entering edit mode clears any cross-filters currently on the dashboard.
Editing Dashboard (Beta) FiltersIn edit mode, a pencil icon appears next to every filter.
To edit a filter, click the pencil icon. That opens a filter configuration window, similar to the one used to add a filter, populated with the existing configuration for the filter. From there, you can update the filter-by field, the filter’s settings, or the tiles to update. Select Update or Cancel in the filter configuration window to save or cancel your changes. After editing filters, click the dashboard’s reload data icon to apply the new filter settings to the tiles. Click Save in the purple toolbar to save your changes and exit edit mode.
Deleting Dashboard (Beta) FiltersIn edit mode, a pencil icon appears next to every filter.
To delete a filter, click the pencil icon. That opens the filter configuration window. Click the Delete button to delete your filter entirely. Deleting a filter cannot be undone.
After deleting filters, click the dashboard’s reload data icon to apply the new filter settings to the tiles. |