AND & OR Statements

A guide on how to build AND and OR statements in the formula editor.

Last updated: March 4, 2022

Table of contents

You can make an AND statement within the same component in the formula editor. AND statement means that you add multiple filter conditions to the component, and they all must be true.

  1. Open the formula editor and create a new data function component.
  2. Choose a lookup function.
  3. Select a data source and field, if applicable.
  4. Add at least two filters to the component. You will see a small "and" between the filter lines. This is how you know you have made an AND statement.

Here's an example:

A development team wants to know how many of the support tickets are qualified as bugs and are pending developer action. Here below is a data source that stores all data on support tickets.

Data Source - Support Tickets (for AND, OR statements)

To find out how many bugs are pending developer action, the team manager builds the following formula:

  • Number of Support Tickets where Resolution is Bug and the Status is Pending developer action

The preview in the formula editor shows 2, which matches the registrations in the data source.

Formula - AND Statement

An OR statement means that you add certain filter conditions to the component where one or the other must be true. Currently you have to add multiple components in the formula editor to make an OR statement.

  1. Open the formula editor and create a new data function component.
  2. Choose a lookup function.
  3. Select a data source and field, if applicable.
  4. Add a filter to your data function component.
  5. Add a new data function component or duplicate the existing one.
  6. In the new component, adjust your data source, field and filters as needed.

Feel free to repeat steps 5 and 6 as many times as needed.


Here's an example:

The same development team from above now wants to see how many bugs are pending both developer action and developer investigation. Here below is a data source that stores all data on support tickets.

Data Source - Support Tickets (for AND, OR statements)

To see how many bugs are pending developer action and investigation, the team manager builds the following OR statement:

  • Number of Support Tickets where Resolution is Bug and the Status is Pending developer action + Number of Support Tickets where Resolution is Bug and the Status is Pending developer investigation

The preview in the formula editor shows 3, which matches the registrations in the data source.

Formula - OR Statement

Was this article helpful?

Please leave a comment to help us improve.