value: "Looker filter expression"
AcceptsA field name and a Looker filter expression
always_filter enables you to require users to include a certain set of filters that you define. You also define a default value for the filters. Though users may change your default value for their query, they cannot remove the filter entirely.
The field referenced in the
field subparameter of the
filters parameter can be a dimension or measure. If you need to reference a dimension or measure that is part of a joined view rather than part of this Explore, use
view_name.field_name. For example:
id filter refers to the
id field from
customer.id filter refers to the
id field from
customer. This example also demonstrates that you can require multiple filters.
value subparameter, specify default values using Looker filter expressions.
Force the user to use an Order ID filter (with a default value of “123”):
Force the user to use an Order Created Date filter (with a default value of the previous seven days):
Force the user to use an Order ID filter (default value of “123”), an Order City filter (default value of “Chicago”), and a Customer Age filter (default value of greater than or equal to 18):
Users Can’t Remove a Filter Specified by
The Explore UI does not let users remove a filter that has been added by
always_filter. If you want to pre-load filters for an Explore in a way that lets users completely remove the filters, consider creating a query that includes suggested filters and then sharing the query with users so they can use the query and its filters as a starting point.
always_filter Parameter Overrides a
default_value Filter Setting
always_filter overrides the
default_value setting for the field. If you declare a value with
always_filter, that value will be the default in the Explore. If you do not declare a value with
always_filter, then “is any value” is the filter default in the Explore.
Things to Know
always_filter Affects Existing Looks and Dashboard Tiles
always_filter to an existing
explore definition adds the set of filters with the default values to any Looks, Explores, or dashboard tiles based on that
explore, including previously saved Looks and dashboard tiles that are based on the
If You Want Filters That Users Can’t Change, Consider
If you want an Explore to have filters that are the same for everyone and that cannot be changed in any way, you can use
If You Want User-Specific Filters That Users Can’t Change, Consider
If you want an Explore to have filters that are specific to each user and that cannot be changed in any way, you can use