Compare Field Values in Salesforce Reports (with Field-To-Field Filters)

Share this article...

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.

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.

5 thoughts on “Compare Field Values in Salesforce Reports (with Field-To-Field Filters)

  1. 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.

    1. 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.

  2. 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

Add Comment