Using Literal Filter Criteria or “Rolling” Date Ranges on Reports

One of those “aha” moments for a Salesforce Administrator is when they discover you can build a report with a rolling date range. For example “All completed Activities in the last 365 days”, “All Opportunities closing in the next 90 days”, “Number of Accounts created last month”, Contacts with no activity in the last 60 days,”etc.

Salesforce officially calls these type of date range filters “Literal Filter Criteria” in Help, though I’ve also heard them referred to 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 December, you’d see Opportunities created in November. If you ran that same report in January, you’d see Opportunities created in December. In many cases this type of dynamic date filter can be desirable versus hard-coding a date range (for example in a Dashboard that reports sales "this month" or "last month").

You can use a literal date range filter on any date field available in your report. Keep in mind if that date field is filtered elsewhere in your report (like in the report "Time Frame" section as in the screenshot below), you may get unwanted results.

With the Summer 12 Release, Salesforce beefed up the options available. Here is a complete list of filters you can apply in a report: