Contains Filter in Salesforce Report

We use contains as an operator that is used for the filter reports as per our requirements. When we want all records that hold a particular value, the value can be a string or number. That time, we can use a contains filter.

In this tutorial, we will learn about the contains filter report, what is the contains filter, its Advantages and Disadvantages, and how to apply this filter in Salesforce. Additionally, we will see how to use the contains filter report in Salesforce Lightning and Salesforce Classic.

Contains Filter in Salesforce

What is the contains filter in Salesforce?

In the Salesforce report, we use contains as an operator that is used for the filter reports as per our requirements. When we want all records that hold a particular value, the value can be a string or number. That time, we can use a contains filter.

For example, in the opportunity object, we want all records that contain the “Communications” word, and we want to fetch all records which has the Communications word. That time, we can apply the contains filter on the report.

Advantages of the contains Filter –

  • If we have a report in that report, thousands of records are there, and we want to find only those records that contain a particular value.
  • This enables the user to narrow down our data and makes it more straightforward to analyze data. It makes our task easier.
See also  How to Create a Metric Dashboard Component in Salesforce

Disadvantages of the contains Filter –

  • It is not Case Sensitive, which means when you try to search “Salesforce” word and in that field multiple words are there like Salesforce Classic, Salesforce Lightning all records will display.
  • If you try to search short String, Eg. “Com” it will display all records that contain Com like, Computer, commodity, company, etc. That is a drawback of contains filter.

How to Apply Contains Filter Report in Salesforce Lightning

Now, we will see how to apply a contain filter with an example.

1. Go to “App Launcher” -> Search “Reports” -> Click on Reports.

Report Filter in Salesforce

2. To create a new report, click the “New Report” button.

Create new Filter Report in Salesforce

3. Go to All category -> to select a report type, Search “Opportunities“, you can search on which object you want to create a report. -> Select Opportunities.

Contains Filter in Salesforce

4. You can see all records will displayed in the report.

Contains Report Filter in Salesforce

5. Here, we want only those records in which Opportunity Name Contains “Edge“. To apply the contains filter -> Click on the Filter option -> Select the field “Opportunity Name“.

6. Select the Operator Contains -> Enter the string which you want to search here I have entered “edge“. -> Click the Apply button.

  • Locked – Using this option, we can lock this filter, which means no one can edit this record on the report run page.
Apply Contain Filter on Report in Salesforce

7. After applying the contains filter, only those records will display who contain the “edge” value.

Use of Contain Filter in Salesforce

This is how we can apply the contains report filter in Salesforce Lightning.

See also  Show Me Filter in Salesforce Report

How to Apply Contains Filter Report in Salesforce Classic

Now we will see the steps, of how to apply the contains filter with different examples.

1. Go to All Tabs -> You will see the “Reports” tab -> Click on the Reports tab.

Report Filter in Salesforce Classic

2. Then click on the “New Reports” button to create a new report.

Create new Filter Report in Salesforce Classic

3. Select the Object, here I have selected “Leads” Object -> Click on the Create button.

Contains Filter in Salesforce Classic

4. Here, you can see when I have created a report of Leads details and all records coming up.

Contains Report Filter in Salesforce classic

5. Here we want only those records in which the Company/Account field Contains “Com“. To apply the contains filter -> Click on the Filter click on Add option -> Select the field “Company/Account“.

6. Select the Contains Operator -> Enter the string which you want to search here I have entered “Com“. -> Click the OK button.

Apply Contain Filter on Report in Salesforce classic

6. After applying the contains filter, you can see only those records that contain the “Com” value.

You can see some differences here, We have searched for “Com” and as a result, we have gotten Telecom, Com, Computer, and Telecommunications which means that the value we searched can start with, end with, or present in between words.

Use of Contain Filter in Salesforce Classic

This is how we can apply a contains filter on a report in Salesforce Classic.

Conclusion

I hope in this tutorial you have got an idea about what is a contains filter in the report with examples, what is the advantages and disadvantages of a contains filter, and how to apply a contains filter report in Salesforce Lightning and Salesforce Classic with different examples.

See also  How to Export Salesforce Report to Excel

You may like to read: