“And/Or” clauses allow you add additional filter parameters to a "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 Where clause to filter an event, drag another event property or user property onto the “Where” drop zone 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 "Where" clause:
- Select "iPhone"
- Click inside of the drop down box
- Add an ampersand after "iPhone"
- Type "Android"