Compare Field Values in Salesforce Reports (with Field-To-Field Filters)
By Bart Lont
September 01, 2021
Have you ever needed to compare two fields in a Salesforce report? Field-to-Field Filters in Salesforce make it possible to compare values in different fields contained on a Salesforce report when defining report filter criteria – for example, only show me records where X field is greater than Y field.
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 use these special filters in your Salesforce reports.
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.
The Author
Bart Lont
Bart has been a Salesforce enthusiast since 2018 and is currently working as an admin for a Dutch non-profit organization.
Very useful. I was wondering, is there a way to get a report based on field changes? I have some custom fields that changed its value because of an integration. I would need to find the records affected with these fields changed.
Run a History report on the object where your fields are found. ie: Account History This will show Old Value and New Value and you can sort by Edit Date.
Is it possible to use field to field filters when one field is on an opportunity and one field is on an account (aka cross-object field filters)? I have two date fields (one on the opp and one on the account) and it won't let me select the account field when I start on the opp field and vice versa
I couldn't get this work with my currency fields on the opportunity split report - the option is available on the age field. We have multi-currency enabled wondering if that's the issue.
Comments: