All Collections
Crosstab and Data Analysis
Advanced
Logical operators: OR, AND, NOT, ANY...OF
Logical operators: OR, AND, NOT, ANY...OF
Updated over a week ago

Logical operators play a crucial role in coding and building target audiences within DataTile. They are also commonly known as boolean operators, and operate under principles of boolean logic.

In DataTile you can use variations of the following logical operators to create logical expressions:

  • OR,

  • AND,

  • NOT,

  • ANY ... OF.

Here's how each of the logical operators are used in DataTile:

  1. OR:

    • The ‘OR’ operator will group people who meet at least one of the specified criteria, e.g. answered ‘yes’ to any of the selected answers. This is useful if you have many potential conditions for inclusion. For example, you might want to find people who live in either "New York" OR "California.

    • How to use: click the LEB icon to open the Expression Builder, add options in the opened window and choose 'OR-join'


  2. AND:

    • The ‘AND’ operator is used to create a filter that must satisfy all of the selected conditions, e.g. people who answered 'yes' to all of the selected answers. For example, in a database of sales records, to find transactions that occurred in a specific month (e.g., January) AND were above a certain amount (e.g., $500), you would use the AND operator.

    • How to use: click the LEB icon to open the Expression Builder, add options in the opened window and choose 'AND-join'


  3. NOT:

    • The NOT operator acts as a filter to exclude particular conditions or categories from your search, such as people who answered ‘no’ to the specified question e.g. customers who are NOT from a certain city.

    • How to use: add an option (or several options with ‘AND-join’ operator) to the Expression Builder, then click on the blue dot on the left of the option to switch it to ‘Not'.

      Switch to the NOT operator


  4. ANY… OF…:

    • The ‘Any [#] Of' operator is useful when you have a list of options, and you want to find people who have said ‘yes’ to X amount of these. For example, take a question where respondents are asked which countries (in a list of 10) they have traveled to, you could use this function to find the people who have visited any 2 number of these (in any combination).

    • How to use: first we add all options to the Expression Builder (with any of the operators), then click on the operator title till it changes to ‘Any Of’ and then write the number of options to choose from.

      How to use ANY OF operator


Did this answer your question?