Sub topic 1
Reports: the Data Behind Every Dashboard
Dashboards do not query Salesforce records directly. Each component uses a report as its data source. The report defines the object, fields, filters, grouping, and calculations. The dashboard then presents that result visually.
Prerequisites
You should know basic Salesforce navigation in Lightning Experience, how to create and run a basic report, and the purpose of Accounts, Opportunities, and Cases. You should also understand that record visibility depends on permissions, roles, and sharing.
Reports: the Data Behind Every Dashboard
Start with a report that answers one focused business question. For example, an opportunity pipeline report might use these settings:
- Report type: Opportunities
- Filter:
Is Closed equals False - Grouping:
Stage - Measure: Sum of
Amount
A dashboard component can display grouped totals, but it cannot recover detail that the report excludes. Test the report first, then use it as a component source.
SELECT StageName, SUM(Amount) total
FROM Opportunity
WHERE IsClosed = false
GROUP BY StageNameThis SOQL query represents the same grouped result conceptually. In Salesforce Setup, report builders use report filters and groupings rather than writing this query.
Preparing Summary and Matrix Reports for Dashboards
A summary report groups rows by one field, such as Opportunity Stage or Account Industry. It is a common source for charts, metrics, and tables.
A matrix report groups rows by both rows and columns. For example, group Opportunities by Owner on rows and by Fiscal Quarter on columns. Matrix reports work well when a dashboard needs a two-dimensional comparison.
Before adding a report to a dashboard:
- Remove fields and groupings that do not support the question.
- Add a clear report-level filter, such as the current fiscal year.
- Select useful summary values, such as record count or sum of Amount.
- Run the report and check that totals match the intended population.
- Save it in a folder that dashboard editors can access.
Creating Your First Dashboard
In Dashboards, select New Dashboard, enter a name, and choose a folder. Select + Component, choose the prepared report, and select a display type. Save the dashboard, then verify it as a viewer would.
A dashboard can contain multiple components based on different reports. Keep each component focused. A report with unsuitable grouping can produce an empty chart or misleading totals even when the underlying records exist.
Chart, Gauge, Metric, and Table Components
- Chart: Shows patterns or comparisons across groups. Use a bar chart for category comparisons and a line chart for time trends.
- Gauge: Shows progress toward a target, such as closed revenue against quota.
- Metric: Shows one value, such as total open pipeline.
- Table: Shows several ranked or detailed rows, such as the five largest opportunities.
Exercise
Which report type is usually best for a chart comparing opportunity amounts by Stage?
Show answer
A summary report grouped by Stage with Amount summarized as a sum.