Understanding filters in Dataslayer

Do you have doubts about how filters work? Don't worry, in this FAQ you will learn the meaning of each filter.

Google Sheets Filters

For BigQuery and API Query Manager are the same filters as Google Sheets

Browser template-Jun-05-2024-09-51-05-4028-AMGoogle Sheets Filters

You will always start selecting the parameter you want to filter, in this case, we have selected the "Year" dimension but you can select any field (metrics or dimensions) from the data source.

Below we explain each filter option:

  • Equals to

This filter will show you only results with the same value you entered.

I.e.: In our year case, if you type "2019", it will only display the results of the year 2019.

  • Not equal to

This filter will show you the results that don't have the same value you entered.

I.e.: In our year case, if you type "2019", it will display the results of all the years except 2019.

  • Greater than
This filter will only display results higher than the value you entered

I.e.: If you type "2019" again will appear results from 2020 onwards.
  • Greater than or equal to
This filter will display results equal to and higher than the value you entered.

I.e.: If you type "2019" again will appear results of 2019 and onwards.
  • Less than
This filter will display results lower than the value you entered.

I.e.: If you type "2019" results for 2018 and below will appear.
  • Less than or equal to
This filter will display results equal to and lower than the value you entered.

I.e.: If you type "2019" results of 2019 and below will appear.
  • Contains

This filter will show results that have the same value you entered.

Let's change the example: imagine that we have selected the dimension "Campaign name" and entered "ES" in the value, all campaigns that have "ES" in their name will appear on the results.

  • Does not contain
This filter will show results that don't have the value you entered.

Following the example above, if we have selected the dimension "Campaign name" and entered "ES", Dataslayer will show all campaigns except for the ones which have "ES" in their name.
  • Start with
This filter will display results that the beginning coincides with the value you entered.

I.e.: if we select the "Campaign ID" dimension and type "2345", all campaigns ID that starts with 2345 will be displayed.
  • Does not start with
This filter will show you the results that don't start with the same value you entered.

Same example as above, with "Campaign ID" dimension and "2345" value, all campaigns will be displayed except the ones whose ID starts with 2345.
  • Ends with
This filter will display results that the ending coincides with the value you entered.

I.e.: if we select the "Campaign ID" dimension and type "567", all campaigns ID that ends with 567 will be displayed.
  • Does not end with
This filter will show you the results that don't end with the same value you entered.

I.e.: if we select the "Campaign ID" dimension and type "567", all campaigns will be displayed except the ones whose ID ends with 567.
  • Matches REGEX

This filter will display results that coincide with the regular expression (regex) you entered.

Learn more about REGEX here.

  • Does not match REGEX
This filter will display results that do not coincide with the regular expression you entered.

For best performance, it is better to select equals or contains filters than regular expression filters because simple comparisons are usually the fastest to process, and can probably be processed directly by the data source's API.

Note: Dataslayer filters do not follow Boolean logic, but follow "A and (B or C)" logic, instead of (A and B) or C. Keep this in mind when combining multiple filters.

 

Looker Studio Filters

Browser template (1)-Jun-05-2024-09-59-54-3003-AMLooker Filters

You will always start selecting if you want to include or exclude the parameter you want to filter. In this case, we selected to include the dimension "Year".

  • Equal to
This filter will show you only results with the same value you entered.

This is because we selected include, with exclude it will show us all the years except the one you entered.
  • Between
This filter will show you only results between the values you entered.

If you select exclude it will eliminate the results between the range you entered.
  • Greater than or equal to
This filter will display results equal to and higher than the value you entered.

If you select exclude, it will eliminate results equal to and higher than the value you entered.
  • Greater than
This filter will display results higher than the value you entered.

With exclude it will eliminate those results.
  • Less than or equal to
This filter will show you results equal to and lower the values you entered.

If you select exclude, it will eliminate results equal to and lower than the value you entered.
  • Less than
This filter will display results lower than the value you entered.

Excluding it will eliminate those results.
  • Is Null

We recommend using this filter with the exclude option. It will eliminate all the null results. 

Depending on the metric or dimension you are using on Looker you can find a few more filters 

Browser template (2)-Jun-05-2024-10-03-13-3417-AM

  • Contains
This filter will show you all results that contain the value you entered.

If you select exclude, it will eliminate the results that have the value you entered.
  • Starts with
This filter will display results that the beginning coincides with the value you entered.

With exclude it will eliminate the results that start with that value.
  • RegExp Match
This filter will display results that coincide with the regular expression you entered.

Learn more about REGEX here.

With exclude it will eliminate those results.
  • ReExp Contains
This filter will display results that contain part of the regular expression you entered.
With exclude it will eliminate those results.
  • In

If you put values separated by commas, in case it matches one, it will include it.

With exclude it will eliminate it.

 

As always, please contact us via our live chat on our website or via email if you still have doubts or questions. We are happy to help!