Start tracking your progress
Trailhead Home
Trailhead Home

Filter Your Reports

Use Report Filters

You can add up to 20 additional filters to a report directly in the Filters pane using the Add button or by dragging in fields from the Preview pane. In addition, you can also use filter logic using “and,” “or,” and “not” operators. Let’s meet the needs of your next stakeholder, the VP of Marketing, to see how filters and filter logic work.

He would like to see a list of all customer accounts based in Texas, North Carolina, Illinois, and New York that have either a rating of Hot or Warm or an annual revenue over $2 million.

Create a new account report.

  1. Click the Reports tab.
  2. Click New Report.
  3. In the Choose Report Type list, click All, and then select Accounts from the list that appears.
  4. Click Continue.
  5. Click the Filters pane.
  6. Click Show Me and select All accounts, then click Apply.
  7. Click Created Date, select All Time from the Range picklist, then click Apply.
  8. Click the Outline pane and select the next to the following fields to remove those columns from the report:
    • Last Activity
    • Last Modified Date
  9. Click the Fields pane to expand the list of fields.
    Filters Pane highlighted
  10. Double-click Annual Revenue to add it to the report.
  11. Click the X to close the Fields pane.
  12. Click and drag the Annual Revenue column so it is placed between the Account Name and Billing State/Province columns.

Add the necessary filters and filter logic.

  1. Click the Filters pane.
  2. Search for Type in Add filter... search box and select it.
  3. In the Operator field, select contains from the drop-down menu.
  4. Type Customer in the value field.
  5. Click ApplyReport filter logic setup
  6. Repeat steps 2-5 above to create the following three additional filters:
    Billing State/Province
    Annual Revenue
    greater or equal
    Note: Annual revenue is two million (six zeros).
  7. In the Filters pane, click the arrow Down arrow icon next to Filters and click Add Filter Logic.
    Filter options
  8. In the Edit Filter Logic field, change the logic to 1 AND 2 AND (3 OR 4) and click Apply.

Save the report as Central and Eastern Target Accounts in the Marketing Reports folder:

  1. Click Save & Run, and then complete the Save Report details:
    • For Report Name: Central and Eastern Target Accounts
    • Click in the Report Unique Name text box to auto-populate the unique name. Don't worry, the unique name of this report isn't checked.
    • For Report Description: Who are our important customers in the Central and Eastern states?
  2. Click Select Folder, select Marketing Reports from the Global Sales Reports folder and click Select Folder.
  3. Click Save.
    Central Eastern Target Accounts report

Use Relative Dates

Instead of filtering data by calendar dates, such as Close Date > Jan 1, 2020, filter your report by a relative date: Close Date = THIS YEAR. Yes, Salesforce will understand this value!

Our CEO is very focused on user adoption of Salesforce and wants to ensure the company is getting the most out of its user licenses. He wants a weekly report of all users who have not logged into Salesforce in the last seven days as well as when their login access is set to expire. How would you accomplish this?

Customize the Users Report Type to display users who have not logged in during the last seven days:

  1. Click the Reports tab.
  2. Click New Report.
  3. Enter Users in the search box and select Users.
  4. Click Continue.
  5. Click the Outline panel.
  6. In the Add column... search box, enter login access, and then select Login Access Exp. Date.
  7. Click the Filters pane.
  8. Click the Last Login Filter.
  9. Under Date, click Last Login and select Login Access Exp. Date from the dropdown list.
  10. Leave Range as All Time and click Apply.
  11. In the Add filter... search box, enter Last Login, then select Last Login.
  12. Create the filter with these details:
    • For operator, select not equal to
    • Click Use relative date and enter Last 7 days
    • Click ApplyRelative Date Filter
  13. Click Save & Run.
  14. For Report Name, enter Users Not Logged in Last 7 Days.
  15. Click in the Report Unique Name text box to auto-populate the unique name. Don't worry, the unique name of this report isn't checked.
  16. For Report Description, enter Who hasn’t logged in the last 7 days?
  17. Click Select Folder, choose Adoption Reports from the Global Sales Reports folder, and click Select Folder.
  18. Click Save.