As a Salesforce admin, I need to generate an account report to display accounts with the type of ‘account=customer-direct.’ The account rating should be hot, or the account should be from the apparel industry.
To create this type of report, first, we need to apply a filter to each field, and then we can use the add filter logic feature to display the appropriate result in the report.
Here, I will explain filter logic in the Salesforce report and then show you how to add filter logic in the Salesforce report using the above scenario and a step-by-step explanation.
Filter Logic in Salesforce Report
When we have two or more conditions to apply to the report, we can use the add filter logic feature to apply the AND or OR operator. By using AND/OR operators, we can apply complex conditions and filter Salesforce reports.
Adding filter logic helps narrow the report results, ensuring you get the data you need based on multiple criteria.
Example 1: Use Add Filter Logic in Salesforce Report
Here, we will see how to add a filter. When we want any particular value in the report, with that value, other values are optional to each other.
In the following step, I explained how to add filter logic to the Salesforce report using the above example.
- Go to “App Launcher” -> Search “Reports” -> Click on Reports. Then click the New Report button.

- Go to the All category -> to select a Report Type or search accounts. You can select an object on which you want to create a report -> Select Accounts.

- Now, we need to apply filters to each field that we want to display. To add a filter, click on the Filter option, then select fields one by one.
- Here, you can see I have added the following three fields that I specified in the example.
- Type = Customer – Direct.
- Rating = Hot.
- Industry = Apparel.
After applying the filter, you can see that only three records are displayed that meet the filter criteria. But as per our scenario, we want to display the account type as customer—direct and rating = hot OR industry = apparel.

4. To achieve that requirement, click on the dropdown arrow. Then click on the Add Filter Logic option.

- Then, you need to enter Logic for the applied filter conditions.
1 AND (2 OR 3)- Type = Customer-Direct.
- Rating = Hot. OR 3. Industry = Apparel.
- Then click on the Apply button.

- Now, you can see that only the Customer-Direct value is displayed in the Type column, and because of the OR condition between the Rating and the Industry columns, if any value of them meets the defined criteria, it is displayed in the report.

In this way, we can use an add filter logic in the Salesforce report.
Example 2: Use Add Filter Logic in Salesforce Report
For example, when we want to display account records with any value that we entered in the filter criteria, we can use the OR operator to add filter logic. Let’s say you want to display account records with either hot or cold ratings.
- Navigate to the report tab and select the object on which you want to create a report. Here, I selected the account object. Then click the Start Report button.
- You can see all records with the Rating field displayed.

- We need to apply logic for both values separately to display in the report. First, I applied a filter to the rating with cold values. -> Then click on the Apply button.

- Similarly, apply a filter to the Rating with Hot values. Then click on the Apply button.

- Now, we need to add filter logic with the OR operator to display both field values, Hot and Cold.
- Click on the Filter Button.
- If you have applied more than one filter, as I have in the above steps, then only the Add Filter Logic option will be available; otherwise, it will not be enabled. Click on the Add Filter Logic option.
- Enter the OR filter logic. In my case, I want a Rating of either “Cold” or “Hot.” So, I have entered 1 OR 2 logic.
1 OR 2- Click on the Apply button.

- You can see all records that are filtered based on rating values with the applied filtered criteria.

In this way, we can use the OR operator with an add logic filter in the Salesforce report.
Conclusion
I hope you have got an idea about adding filter logic in a Salesforce report. In that, we have seen why we need to use add logic filter and how we can use AND/OR operators in the logic filter to filter and display the records based on multiple criteria. Then, with the help of an example, I explained how to use add filter logic in the Salesforce report.
You may like to read:
- Add Cross Filters in Salesforce Report
- Create a Campaign Report in Salesforce
- Filter Out Null Values in Salesforce Report

Shubham is a Certified Salesforce Developer with technical skills for Building applications using custom objects, approval processes, validation rule salesforce flows, and UI customization. He is proficient in writing Apex classes, triggers, controllers, Apex Batches, and bulk load APIs. I am also familiar with Visualforce Pages and Lighting Web Components. Read more | LinkedIn Profile