Reports

How to build a custom Salesforce report

5 min read · Updated on

Written by Séton Estumento, independent Salesforce consultant, Business Analyst and administrator

A good Salesforce report answers a precise question: which deals to follow up, how much will close this month, which team needs help. A bad report gives a wrong number, and the team goes back to Excel. Here's how to build the first kind, with a concrete example: opportunities with no activity for 30 days.

Before you click: the question and the decision

Write in one sentence what the report should help you decide. "Every Monday, know which open opportunities haven't moved in a month, so each rep can follow them up." That sentence gives you the object (opportunities), the filters (open, no recent activity), the grouping (by rep) and the schedule (every Monday).

Step 1: choose the report type

The report type decides which objects and fields are available. It's the most important choice, and the hardest to fix later.

  • Standard types: Opportunities, Accounts and Contacts, Activities… They cover most needs.
  • Custom types: created in Setup, they link objects by your rules, for example "Accounts with or without Opportunities". The "with or without" option helps you find what's missing.

For our example, the standard Opportunities type is enough.

Step 2: choose the format

FormatUse
TabularA simple list, to export or scan
SummaryRows grouped (by rep, by stage) with subtotals
MatrixGroupings in rows and columns, for example stage × month
JoinedSeveral blocks side by side, possibly on different report types

A chart or a dashboard component needs at least one grouping: choose Summary as soon as you want totals.

Step 3: set the filters

Start with the standard filters at the top of the report:

  • Show Me: "All opportunities", not "My opportunities", if the report is for the whole team;
  • Date range: watch which field is used. By default it's often the close date; for our example, choose "All Time".

Then add field filters:

  1. Closed = False (open opportunities only);
  2. Last Activity earlier than "30 days ago" (a relative date that moves forward on its own);
  3. Last Activity is blank.

Filters 2 and 3 must be combined with OR: add filter logic and enter 1 AND (2 OR 3). Salesforce expects the operators AND, OR and NOT, and the numbers of the field filters. Without filter 3, opportunities that have never had any activity would drop out of the report, even though they are often the riskiest.

Report builder · FiltersFictitious data
  • Show MeAll opportunities
  • Date rangeAll Time
  • 1Closed equals False
  • 2Last Activity less than 30 DAYS AGO
  • 3Last Activity equals (blank)
  • Logic1 AND (2 OR 3)

14 open opportunities with no recent activity

Demo screenshot, fictitious data: the filters of the "opportunities with no recent activity" report

The Last Activity field is kept up to date by Salesforce from related tasks and events. If your reps don't log their calls or meetings, the report will show it quickly: that's useful information too.

Cross filters

For the opposite question, "opportunities with no open task", use a cross filter: "Opportunities without Activities". Cross filters answer presence-or-absence questions that field filters cannot ask.

Step 4: group and calculate

  • Group rows by Opportunity Owner.
  • Add Amount as a sum: each rep sees what they risk losing.
  • Sort by amount, descending.

To go further:

  • summary formula: a calculation on totals, for example each rep's share of the amount at risk;
  • row-level formula: a calculation per row, for example the number of days since the last activity;
  • bucket field: categorise without creating a field, for example amounts as "small", "medium", "large".

Step 5: check the numbers

Before sharing, take three opportunities you know and check that they appear, or don't, for the right reason. It's the most frequently skipped step, and the one that builds trust in the report.

Step 6: save, share, subscribe

  • Save the report in a shared folder for the team concerned, not in "My Personal Reports".
  • Subscribe the reps: Salesforce can email the report on a schedule, for example every Monday at 8 a.m.

From report to dashboard

A dashboard brings together several components, each fed by a source report. A few rules:

  • one component = one question, with a title that asks it ("Amount to follow up by rep");
  • each source report has at least one grouping;
  • the running user determines the data displayed. A dynamic dashboard shows the data of the person viewing it (how many you can have depends on your edition);
  • fewer components beat many: four to six readable metrics are enough for a management meeting.

The Salesforce sales dashboard guide details the components that are useful to a sales director.

Mistakes to avoid

  • Leaving "My opportunities" in a report meant for the team.
  • Filtering on the wrong date (close date instead of created date, or the other way round).
  • Creating a new report for every question instead of adjusting an existing one: after a year, nobody knows which is the right one.
  • Forgetting blank values in filters, as in our example.
  • Sharing a report without checking three known cases.

What if the report you need is more complex?

Some needs call for a custom report type, a calculated field on the object or a data clean-up first. That's often where a few hours of an admin's time save weeks of exports. See our Salesforce reports and dashboards service.

Official references

Salesforce documentation to go further:

Frequently asked questions

First check the standard filters at the top of the report: "My opportunities" instead of "All opportunities", and the date range (often the close date over a short period). These are the two most common causes.

A custom report type links objects that have a relationship. To compare objects with no direct relationship, the joined format (several blocks) can help, within its limits.

The report is visible based on the folder it is saved in and that folder's sharing. The data shown always depends on the viewer's access, except for a dashboard with a fixed running user.

A problem with your Salesforce?

Describe it in a few lines. Reply within one working day, free quote.

Describe my problem