Using filter logic for advanced reporting

When you add more than two filters to a report with both AND and OR Boolean operators, you'll need to organize them using the Filter Logic field to get more control over your report results.

If we want a report of all email or phone call tasks assigned to one user, Deb, we'd use these filters:

1. User Responsible = Deb
AND
2. Category = Email
OR
3. Category = Phone call

The problem here is that the last OR will retrieve all Phone Call tasks, whether they're assigned to Deb or not. With filter logic, we can get different results by grouping (or "nesting") the filters.

To use filter logic:

  1. Add the filters to your report. Did you notice that the filters are numbered on the left? You'll use these numbers in the Filter Logic formula bar.

  2. Click the Configure Filter Logic icon. This will display the formula bar.

  3. Edit the logic by adding parentheses or changing the operators. For example, you can change "1 AND 2 OR 3" to "1 AND (2 OR 3)" to get the right results in your report.

  4. Click the OK button to apply your changes.

In our example, we've gone from a report that looked for "tasks assigned to Deb in the Email category or tasks in the Phone Call category" to "tasks assigned to Deb in either the Email category or the Phone Call category."

Another way of stating the same report is: "Tasks assigned to Deb in the Email category, or tasks assigned to Deb in the Phone Call category." This would yield the same report results, but the formula would be: (1 AND 2) OR (1 AND 3).

Either of the above formulas will work to get the same results.


Nested filters

As you add more filters to your report parameters, your formulas will become more complex. A report with five filters can have many different combinations, depending on where you add parentheses:

(1 AND 2) OR (3 AND 4) OR 5
1 AND ((2 AND 3) OR 4 OR 5)
((1 AND 2) OR (3 OR 4)) AND 5

Placing parentheses within parentheses is called nesting. The important thing to remember with nesting is that Insightly will process the arguments in the innermost parentheses first and work outward.

As you enter more complex filter logic, examine the formula one step at a time using the same principles as you would with one or two filters for each argument within a set of parentheses.

Was this article helpful?