Modify Filters With And/Or Clauses

And/Or clauses allow you to add additional filter parameters to a Filter Where clause. These clauses require query results to match multiple conditions (“and” clause) or match one of several options (“or” clause).

Create an “And” Clause

After using a Filter Where clause to filter an event, add another filter below the one you just created, or drag another event property or user property onto the Filter Where parameter to build an “And” or an “Or” clause. For example, you may want to look at user who did View Content where the Platform is equal to Desktop and the user’s Marketing Channel is Affiliate. This would help understand how many users acquired through an affiliate are viewing content on their desktops.

Create an “Or” Clause

Alternately, use “Or” to view users who did View Content where the platform is equal to Desktop or the platform is equal to Android to see the total content views made by anyone who used either a Desktop or an Android device. This can help when looking for very granular behavior patterns.

Changing an “And/Or” Clause to a “By” Clause

Within the “And/Or” dropdown menu, there also exists an option to instead create a “By” Clause. After selecting the “By” option in the dropdown menu, the clause will be re-applied as a “By” clause breakout.

In-Line “And/Or” Clauses

You may also add And/Or clauses in-line within the filter dropdown using the symbols ”&” (shift+7) and ”|” (shift+) to represent “And” and “Or” respectively.

Rather than create a new line in the query for each additional value in the row, click within the box and use an ampersand (and) or a pipe character (or) to quickly add And/Or clauses in the same line.

For example, you may want to see how many content views came from the users on the platforms iPhone and Android. In the Filter Where clause:

  1. Select iPhone
  2. Click inside of the drop down box
  3. Add an ampersand after iPhone
  4. Type Android

Was this page helpful?