---
schema_version: "1"
id: a1e2aac52cd7d9e452e92af9190eb46451edae987f1846856dc02092e858fa23
title: Add Filter Logic to a Report
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/filter_logic.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.filter_logic.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 032bb57fe77b3bab7de890e4f8941c9c0f54a8d5b62fef9fa90c986560049fd6
description: Filter logic governs how and when filters apply to your report.
products:
  - Cross Cloud
release: "264"
---
# Add Filter Logic to a Report

Filter logic governs how and when filters apply to your report.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Essentials</strong>, <strong>Group</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d26492e82">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d26492e82 ">To create, edit, and delete
              reports:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d26492e82 ">
              <p>Create and Customize Reports</p>
              <p>AND</p>
              <p style="margin-bottom:0;">Report Builder</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d26492e82 ">To create custom list views:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d26492e82 ">Read on the type of record included in the list</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d26492e82 ">To create, edit, or delete public list views:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d26492e82 ">Manage Public List Views</td>

          </tr>
        </tbody>
      </table>

After adding a filter to your report, the filter is numbered. Your first filter becomes Filter 1 and your second filter becomes Filter 2. You apply filter logic based on these numbered filters.

For example, let’s say you have a report of Accounts with fields like State, Annual Revenue, and Industry. Your report has these filters:

- State includes California, Arizona, Nevada
- Industry equals Banking
- Annual Revenue greater than 1000000

These three filters cause your report to return accounts in California, Arizona, or Nevada in the Banking industry with annual revenue greater than $1,000,000. But what if you want accounts only in California, Arizona, or Nevada AND in the Banking industry, OR with annual revenue greater than $1,000,000.00? Add filter logic to your report.

1. From the Lightning Report Builder, click  **![the filter icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-analytics-264-0-0-production-enus/295fead5-b71d-4e1c-9886-4af4d53400b6/analytics/images/rd/rd_icon_filter.png) Filters** | **![the filter actions icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-analytics-264-0-0-production-enus/295fead5-b71d-4e1c-9886-4af4d53400b6/resources-global/_corporate/images/dropdown.png)** | **Add Filter Logic**.
    
    From the Salesforce Classic Report Builder, click **Add** | **Filter Logic**.
2. Enter each filter line number, separated by a filter logic operator.
    
    For example, `(1 AND 2) OR 3` finds records that match both Filter 1 and Filter 2, or Filter 3.
    
    Here’s a complete table of filter logic operators:
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col style="width:50%">
              <col style="width:50%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d26492e189">Operator</th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d26492e191">Definition</th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Operator" class="slds-cell-wrap" style="vertical-align:top;" headers="d26492e189 "><code>AND</code></td>
                <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d26492e191 ">
                  <p>Finds records that match both values.</p>
                  <p style="margin-bottom:0;"><code>1 AND
           2</code></p>
                </td>
              </tr>
              <tr class="">
                <td data-label="Operator" class="slds-cell-wrap" style="vertical-align:top;" headers="d26492e189 "><code>OR</code></td>
                <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d26492e191 ">
                  <p>Finds records that match either value.</p>
                  <p><code>1 OR
           2</code></p>
                  <p style="margin-bottom:0;">For example, Filter 1 is <code>Amount is greater
            than “$50,000”</code>. Filter 2 is <code>Type equals “New
            Business”</code>. If you set the filter logic as <code>1 Or
            2</code>, the report returns records that are either high value or new
                    opportunities.</p>
                </td>
              </tr>
              <tr class="">
                <td data-label="Operator" class="slds-cell-wrap" style="vertical-align:top;" headers="d26492e189 "><code>NOT</code></td>
                <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d26492e191 ">
                  <p>Finds records that exclude values.</p>
                  <p style="margin-bottom:0;">For example, Filter 1 is <code>Industry equals “Biotechnology”</code>. If you set the filter
                    logic as <code>Not 1</code>, the report returns records that
                    aren’t equal to Biotechnology.</p>
                </td>
              </tr>
            </tbody>
          </table>
3. Click **Save**.

Now your report shows Banking industry accounts in California, Arizona, and Nevada with any amount of revenue, and any account with annual revenue above $1,000,000.00.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-analytics-264-0-0-production-enus/295fead5-b71d-4e1c-9886-4af4d53400b6/images/icon_note.png)

Note

- You can’t apply filter logic to standard report filters.
- You can add up to 20 custom filters.
- Filter logic isn't available for all filters. For example, you can’t use a filter for rollup summary fields.
- On reports where object A may or may not have object B, you can't use the OR condition to filter across multiple objects. For example, if you select Account Name starts with M OR Contact First Name starts with M, an error message informs you that your filter criteria are incorrect.
- If your field filters use these fields, you can’t include filter logic.
    - Topics
    - Description
    - Any Address Line 1, Address Line 2, or Address Line 3 fields
    - Forecast Category
    - Campaign: Member Type
    - User: Profile Name
    - Login Status
    - Custom long text area fields
    - Old Value or New Value fields
    - Composite fields, such as Full Name

#### See Also

- [Notes about Filtering on Types of Fields and Values](https://help.salesforce.com/s/articleView?id=analytics.notes_on_entering_filter_criteria.htm&release=264.0.0&type=5 "Keep these tips in mind when filtering on text fields, date fields, numeric values, picklist values, and blank or null values.")