Open navigation

How to use filters in Supermetrics queries in Excel

Filtering your data ensures that only the data you want to see in your final report surfaces there. Any metric or dimension in a data source can be used as a filter.


Follow these steps to start using filters with your Supermetrics queries in Excel. 


Instructions

You can add as many filters to a query as you need. A filter will only apply to the query that includes it, and no others.

  1. Open the Supermetrics sidebar in Excel.
  2. Navigate to the Filter section.
  3. Add the field you want to filter by in the first field.
  4. Add your operator and then your filter string.

    For example, the field “Campaign name” with the operator “Equals” and the filter string “Enterprise” would create a filter that only shows data for campaigns with the name “Enterprise” when you run the query.

  5. Click Get Data (or Update, if the filter is being applied to an existing query) to run your query with the filter.


About operators

When creating strings that include any of these operators, please note that some ignore a word’s capitalization while some don’t.


Equals, Does not equal, Contains, and Does not contain ignore a word’s case, so “TOFU 2020” and “tofu 2020” would show the same results.


However, Matches regex and Does not match regex filter values based on the string’s case, so when using either of these operators, “TOFU 2020” and “tofu 2020” would return different results.


Equals
The Equals operator compares the query results to the string you enter into the value field, and it will include only the results that match your string completely.
Does not equal

Does not equal  is the direct opposite of Equals. This operator will leave out matching results. 

Letter case is irrelevant in Does not equal (so “TOFU 2020” and “tofu 2020” would return the same results).

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 (that part still has to fully match the value you enter into the filter).
Does not contain
This is the direct opposite of Contains. This operator will leave out matching results.
Matches regex

The Matches regex operator takes the regular expression string you enter into the value field and compares it to the results, leaving in the results that match your regex string.


There are many resources available to learn more about regular expressions. For example, RegexOne offers a simple tutorial with interactive exercises.

Does not match regex
The Does not match regex operator is the direct opposite of Matches regex. This operator will leave out the matching results.

Troubleshooting

If you’re having trouble getting your filter to work properly, check these settings.


Whitespace

An extra whitespace (a space between letters, numbers, or words, sometimes left at the beginning or end of a string) can stop a filter from reading the value field string properly. Check for extra whitespaces and remove them.


Old fields

Sometimes, a filter set up in the past can contain fields that aren’t supported any longer. Check our field list to make sure your filter’s fields are still valid.


Did you find it helpful? Yes No

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