User Guide Getting Started Help Center Documentation Community Training
Looker
  
English
Français
Deutsch
日本語
Changing Filter Suggestions

This page provides an overview of LookML parameters that affect filter suggestions. This page lists each parameter with a link to its full reference page, a short description of its function, and an image of what it does.

Default Behavior

By default, in a Look or Explore, when a user enters a filter value for a dimension of type: string, Looker suggests options that match what the user enters. On a dashboard, if the filter is a Field type filter and the field it is linked to is of type: string, Looker also suggests filter options. These filter suggestions are created using a SELECT DISTINCT query on the dimension, so the suggestions will only return values that match existing data for that field:

Enabling or Disabling Filter Suggestions

This section describes the following LookML parameters that let you enable or disable filter suggestions:

suggestable (Field)

Setting suggestable to no lets you disable suggestions for a dimension or filter. The default value of suggestable is yes, so Looker provides suggestions to the user when possible. If you set suggestable to `no“ instead, Looker does not make suggestions.

suggestions (View)

Setting suggestions to no lets you disable suggestions for all the dimensions in a view. The default value of suggestions is yes, so Looker provides suggestions to the user when possible. If you set suggestions to no instead, Looker does not make suggestions.

Filter Suggestion Values

This section describes the following LookML parameters that let you set or restrict the values shown in filter suggestions:

allowed_value (Field)

allowed_value works with the parameter LookML parameter. If a Looker developer provides a parameter filter-only field, the values entered or selected by users can be referenced using a {% parameter %} Liquid variable. Optionally, you can use allowed_value to define a list of values a user can choose for that parameter field.

allowed_value has two subparameters, label and value. The label subparameter specifies the options the user will see in the filter suggestions. The value subparameter contains the values that are passed to the {% parameter %} Liquid variable.

For more information, see this section of the parameter reference page.

bypass_suggest_restrictions (Field)

bypass_suggest_restrictions enables filter suggestions in situations where they would otherwise be disabled or limited. If you have used sql_always_where or access_filter to restrict the rows users can see, then Looker also restricts the filter suggestions to the values in the permitted rows. However, if you’re certain that there are no possible values in a particular dimension or filter field that would reveal sensitive information, you can use bypass_suggest_restrictions to reinstate the full set of filter suggestions.

case (Field)

case enables you to bucket a dimension’s results with case logic. This impacts filter suggestions because only the values defined in the case statement are shown as filter suggestions for that dimension.

The suggestions presented to a user for a dimension using case will not be restricted when using full_suggestions. Any option that you include in a case parameter will be visible to all users.

full_suggestions (Field)

When full_suggestions is set to no, it disables filter suggestions for a dimension.

The suggestions presented to a user for a dimension using case will not be restricted when using full_suggestions. Any option that you include in a case parameter will be visible to all users.

suggest_dimension (Field) and suggest_explore (Field)

Looker typically generates filter suggestions by executing a SELECT DISTINCT query on the filter field. For some large tables this query can be too slow or create too large a database load. You can use suggest_dimension to make Looker query an alternative dimension for filter suggestions, in combination with suggest_explore if that dimension lives in a different Explore.

suggestions (Field)

suggestions lets you hard-code a list of possible filter suggestion values. This can be useful if you do not want certain data values in a field to appear as suggestions, and instead wish to specify a more limited list.

Caching Filter Suggestions

This section describes the suggest_persist_for parameter, which lets you configure the length of time that filter suggestions are cached.

If you wish to reduce the load on your database and the number of data values for a dimension is very high, consider using a parameter to disable filter suggestions for your dimension. If you want filter suggestions to appear, consider using a parameter to limit the filter values that are queried or to hard-code the appropriate options.

suggest_persist_for (Field)

By default, filter suggestions are cached for 6 hours, resulting in the same list of suggestions for that length of time. The suggest_persist_for parameter enables you to change how long filter suggestions are cached.

Top