Open navigation

How to use Supermetrics filters in Looker Studio

Filtering is a way to control the end results of your query in reports you create with Supermetrics in Looker Studio (formerly Data Studio). All the fields available in a data source can be used as a filter. A filter is built by choosing the field to filter by, choosing the logical operator, and then entering a value to filter by. 


Instructions

  1. Open a report in Looker Studio, and click any report element created with Supermetrics.
  2. In the side panel, scroll down to Filters.
  3. Click +ADD A FILTER to create a new filter.

You can add, edit, or remove filters anytime by navigating to Resources in Looker Studio’s top menu and clicking Manage filters.



Building a filter

Once you’ve created an empty filter, you’re ready to define its elements.


First, give the filter a descriptive and unique name, so you can easily use it in other elements in the same report. 


Next, choose the filter functionality — either “Exclude” or “Include”. Inclusive filters look for results matching your values and include them in the results, while exclusive filters do the opposite, looking for results that match your values and dropping them out of the results.


Finally, choose the field to filter by). Select your Condition and finalize the filter by adding the value (or several values, for some filters). Once you're happy with your filter, click SAVE.


Adding multiple filters to a single query

You can add multiple filters to a single query. To do this, choose either “AND” or “OR” join. This will open the new filter entry fields and decide how your two filters will work. 


If you choose “AND”, then your results must match both filters to be shown or discarded. If you choose “OR”, results that match either of your filters will be shown/discarded.


Commas

If your filter values contain commas, they won't be read correctly. Each comma in the value field will be read as a stop for the previous value and start for the next. For example, a campaign name “My First Campaign, Winter and Fall” will be read as two values for the filter - My “First Campaign” and “Winter and Fall”.


Filter conditions

Use this reference list to learn more about each Looker Studio filter condition.

Equals (=)
The “Equals (=)” operator compares the query results to the string you enter into the Value-field, which will include only the results that match your string completely.
Contains
The “Contains” operator takes the string you enter into the Value-field, compares the query results to it, and it will include only the results that have your string as a part of them.
Starts with
The “Starts with” condition takes your value, and compares it to the results, matching from the beginning of the string only. All matching values will be shown/discarded.
RegExp Match
The RegExp Match operator takes the regular expression string you enter into the Value-field and compares it to the results. Results that match the string completely will be shown/discarded.
RegExp Contains
The “RegExp Contains” condition takes the regular expression that you have entered, and matches it to any part of the results - if the part matches, the results will be shown/discarded.
In
With the “In” condition, you can enter several options separated by a comma. “In” works like “Equals (=)” in the sense that your value must match the result value exactly (except for letter case) to work as expected. If any values are separated by commas matches, the row is shown/discarded.
Is Null
The “Is Null” condition will look at the results and show/discard only the rows where the chosen field value is Null (not text “Null”, the value must actually be missing - e.g. Null).


Troubleshooting

No data

If your filter runs into a "No data" error or is producing wrong results, the first step is to double-check the filter’s setup.


A good way to troubleshoot your filter is to make sure the field used in your filter is also selected in the query as a metric or a dimension. Remove the filter, run the query and see if the results for that field would be caught by your filter or not.


Formatting

A missing or extra whitespace at the beginning or end of a line can cause errors. Check your string for extra or missing whitespace.


When using regular expression filtering, letter case can cause issues. Check that the letter case in your filter matches the letter case in the results you’re filtering (for example, if you’re trying to match "Awareness", and filtering "awareness" isn’t working, try "Awareness" instead).


Invalid filter

Double-check your selected fields to ensure they’re the right ones for your query. Filters can only be used for the data sources the field belongs to. For example, filters created for the Facebook Ads data source can't be used for Google Ads data. 


Sometimes, old reports can have filters for fields that are no longer supported. Check our documentation for an up-to-date list of supported fields.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.