Skip to main content
Skip table of contents

Data filtering

ADVANCED TOOLS

Use filters to restrict the data that you're viewing by specific criteria. Query tiles have filters applied that impact only that tile. Dashboard filters can apply to all tiles on a dashboard, or to only one tile. 

Any field can become a filter. You don't need to add a dimension or measure to your data table to filter on it. For example, you can filter Order Date to the last 90 days, even though your results show only Customer and Number of Orders

You can use any combination of these filter types in your query: 

  • Basic filters are the most common. The system provides drop-down lists, calendar widgets, and text fields. 

  • Advanced matches allow for a more advanced condition for a field, such as text searches, or a date range that starts in the past and extends for a certain number of days. 

How filtering works

Dimensions 

When you filter on a dimension, you restrict the raw data before any calculations are made. 

EXAMPLE  

You want to know the number of orders placed each day that are over $50.  When you filter the data by the order amount (a dimension), all orders less than $50 are removed from the data before the order count is calculated. 

Measures

When you filter on a measure, you restrict the results after the measure has been calculated. 

EXAMPLE   

You want to know the number of days you received more than 350 orders. The system first counts all orders for each day. Then, the filter of more than 350 orders (a measure) removes the days that had less than 350 orders, leaving the days that had more than 350 orders. 

Basic filters 

There are a couple of ways to add a basic filter: 

  • In the Field Picker, select the Filter by field button to the right of the field name. 

  • In the Results tab of the Data pane, select the gear menu button > Filter on

    image-20240807-141342.png

Filters appear in the Filters section above your results. To remove a filter, click the X next to the filter. 

Filter options 

Standard filter options vary by filter type.  

EXAMPLES  

  • Time dimensions let you select a time range 

  • Numeric dimensions provide options such as equal to or greater than 

  • For text dimensions, a list of existing data values for the field is displayed. As you type, the list narrows to values that include that text. 

Text filters preserve leading and trailing spaces. For example, if you filter on “ pants” the filter returns values that contain the space before the word pants, such as “parachute pants.” The filter won’t return values that don’t contain the leading space, such as “pants and leggings”.

When you copy and paste a value into a text filter, leading and trailing spaces are trimmed. 

Tips for standard filters 

  • To filter on a large set of values, paste a list of values into the Filter field. The maximum number of values that you can paste may be limited by your browser or other elements in your network. 

  • To enter a special character in a standard filter, first add a leading backslash. For example, to filter on “Santa Cruz, CA”, enter Santa Cruz \, CA

  • To add another option to the filter, click + to the right of a filter. The new option appears as either an OR condition or an AND condition, depending on the type of filter. 

EXAMPLE If you start with the filter condition “is greater than 5000,” and add the condition “is less than 2500,” Looker adds an OR condition between these statements. If you then add the condition “is not equal to 1500,” Looker adds an AND condition. The resulting filter includes order counts over 5,000 or below 2,500, and it excludes order counts of 1,500. 

Advanced match filters

The system provides the following advanced and customizable filter options:

image-20240715-140000.png
  • matches a user attribute User attributes let you automatically customize a query for each user that views it (e.g., a user automatically sees data only for their own sales region). You must have the Org Admin permission to define user attributes, but anyone can use the filter.

  • matches (advanced) Advanced matches let you enter advanced filter expressions. To view all available filter expressions, see the Looker filter expressions documentation ↗️ . 

To enter a special character in an advanced matches filter, first add a leading carat (^). For example, to filter on “Santa Cruz, CA”, enter Santa Cruz ^, CA

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.