Sub topic 4
Tabular reports: the starting point
This chapter assumes you can open the Lightning report builder and have chosen a report type, as covered earlier. It also assumes you know what an object, a record, and a field are.
What a tabular report is
A tabular report is a list. Each row is one record, and each column is one field. It works like a spreadsheet that reads live data from Salesforce.
Tabular is the simplest of the four formats. It has no groupings and no subtotals. Summary, matrix, and joined reports all add structure on top of this same list of rows and columns.
Building one
In the report builder, you do four things:
- Pick a report type, for example Opportunities. The type decides which objects and fields you can use.
- Add columns from the field list. Drag them to reorder them.
- Apply filters and a scope, such as "My opportunities" or "All opportunities".
- Sort by clicking a column heading, or choose a sort order in the builder.
Choose the Tabular format in the report's format menu. If the report already has groupings, switching to Tabular removes them.
Totals and counts
A tabular report can show a record count and a grand total for a column. For example, it can show the sum of Amount across all rows. It cannot show a subtotal for part of the data, because nothing is grouped. If you need totals per stage or per owner, you need a grouping, and that makes the report a summary report.
A SOQL comparison
A tabular report is close to a plain query with no GROUP BY. This query returns the same rows as a tabular report that filters on open opportunities, sorts by Amount, and keeps the top 10.
SELECT Name, StageName, Amount, CloseDate
FROM Opportunity
WHERE IsClosed = false
ORDER BY Amount DESC
LIMIT 10Row limits and dashboards
Tabular reports have two limits that surprise people.
- The report page shows a limited number of rows, typically 2,000 in Lightning. Export the report when you need every row.
- A tabular report cannot feed a dashboard component unless you set a row limit. The row limit keeps the top or bottom N rows by a field you choose. This turns the report into a ranked list, such as "Top 10 opportunities by Amount".
Where tabular fits
Use tabular reports in these cases:
- You need a list of records to work through, such as overdue tasks.
- You want to export data to a spreadsheet.
- You are exploring a new report type and want to check which fields and filters return the rows you expect.
- You need a ranked top-N list on a dashboard.
Start most new reports as tabular. Confirm the rows are correct. Then add groupings only when you have a question about totals or comparisons.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Expected rows are missing | The scope or a filter is too narrow, or the report type excludes records without a related record | Check the scope, then review each filter and the report type |
| Cannot add a chart to a dashboard | No row limit is set | Set a row limit and a sort field |
| No subtotals appear | Tabular reports have no groupings | Group the rows to make a summary report |
| Only part of the data appears on screen | The page row display limit | Export the report or add filters |
Exercise
A manager wants a dashboard table of the five largest open opportunities. Which format do you use, and what setting must you apply for it to work on the dashboard?
Show answer
Use a tabular report filtered to open opportunities, sorted by Amount in descending order. Set a row limit of 5 on Amount. Tabular reports cannot feed a dashboard component without a row limit.