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 Prospects with "Do Not Email" and "Do Not Call" checked that are assigned to one user, Kourtney, we'd use these filters:
1. Owner = Kourtney
2. Do Not Email = is checked
3. Do Not Call = is checked
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:
- Add the filters to your report.
Notice that the filters are numbered on the left. You'll use these numbers in the Filter Logic formula bar.
- Click the Configure Filter Logic icon. This will display the formula bar.
- 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.
- Click the OK button to apply your changes.
In our example, we've gone from a report that looked for "Prospects assigned to Kourtney checked Do Not Email or checked Do Not Call" to "Prospects assigned to Kourtney that are either checked Do Not Email or checked Do Not Call."
Another way of stating the same report is: "Prospects assigned to Kourtney that are checked Do Not Email, or Prospects assigned to Kourtney that are checked Do Not Call." 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.
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.