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.
- Open a report in Looker Studio, and click any report element created with Supermetrics.
- In the side panel, scroll down to Filters.
- 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.
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”.
Use this reference list to learn more about each Looker Studio filter condition.
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.
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).
Double-check your selected fields to ensure they’re the right ones for your query.
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.