One of the latest Salesforce reporting features makes it possible to compare values in different fields on a Salesforce report, when defining report filter criteria. Let’s check it out!
In this guide, I will show you a Field-To-Field Filters example comparing “Total Donations This Year” and “Total Donations Last Year” – by the end, I am sure you will have thought of many other ways you can compare fields in a Salesforce report.
Read more: How to Create a Report in Salesforce
Field Comparisons with Field-To-Field Filters
- While editing a report, select the ‘Filters’ tab. Then choose a field from the ‘Add filter…’ lookup.
- If the field you chose to filter on supports field-to-field filters, then set the Type dropdown to ‘Field’ (if the field does not support field-to-field filtering then the Type dropdown does not appear).
- Choose the Operator and select the field that needs to be compared with.
Let’s take a look at this in practice.
Suppose you have these two fields on the Contact object:
- Total Donations This Year
- Total Donations Last Year
At the moment, your report looks like this:
You only want to select donors that donated more this year than they did last year. Click ‘Edit’ on the report and add a new filter:
In this filter, you compare Total Donations This Year with Total Donations Last Year. Do you spot the difference? Instead of selecting a numeric value for ‘greater than’, you now select a field value, namely, the value of ‘Total Donations Last Year’.
This is the result:
Considerations for Using Field-To-Field Filters
- Field-To-Field comparisons only work on these types of fields: Numeric, Currency, Date and Datetime.
- You can only compare fields of the same data type (in our example, we made a comparison between two currency fields)
- In a report, you can have up to four Field-To-Field filters.
- This only works in Lightning Experience.
What are you going to use Field-To-Field Filters for in your org? Let us know in the comments below.