Sunday, November 30, 2014 - Understanding Relative Date Values for Filter Criteria

Understanding Relative Date Values for Filter Criteria

In Salesforce you are able to build a report with a rolling or relative date range. Here are some examples of what that means;

All Opportunities closing in the next 60 days
All Completed Activities in the last quarter
Number of Accounts created last month
Contacts with no activity in the last 90 days
Number of Opportunities lost last fiscal year

Salesforce officially calls these types of date range filters Literal Filter Criteria, and has over 40 available date filters. Salesforce also refers to these filters as Relative or Rolling date filters. They allow you to write a dynamic report that looks forward or backward for a set period of time based on when you ran the report. For example, if you have a report to return all Opportunities created Last Month(based on the Created Date field) and ran that report in March, you’d see Opportunities created in February. If you ran that same report in February, you’d see Opportunities created in January. In many cases this type of dynamic date filter can be desirable versus hard-coding a date range.

You can use a literal date range filter on any date field available in your report. Keep in mind if the date field is filtered elsewhere in your report, you may get unwanted results.