Reports and dashboards
Turn the records in your org into answers. Build tabular, summary and matrix reports, filter and group them, make a custom report type, and put the results on a dashboard for Brew & Bean.
A report is a saved question about your data: "How many orders do we have in each status?" or "What did each customer spend?". A dashboard is a page of charts and tables, each fed by a report, so that a manager can see the answers at a glance.
In this tutorial you will build reports and a dashboard on the Brew & Bean orders. Prerequisites: the data model from *Data model: objects, fields and relationships*, and at least six or seven Coffee Orders with order items, with a mix of statuses (Received, Preparing, Ready, Picked up). Create them quickly in the Brew and Bean app if you have not.
Report types and formats
Every report starts from a report type, which decides which objects and related objects you can include. Salesforce provides standard report types (Accounts, Opportunities, Cases) and creates a report type for each custom object that has Allow Reports ticked. Admins can create custom report types to join objects in a particular way.
The four report formats
| Format | Looks like | Use it for |
|---|---|---|
| Tabular | A simple list with rows and columns | Exports and simple lists, like all open orders |
| Summary | Rows grouped by one or more fields, with subtotals | Orders per status, sales per customer |
| Matrix | Grouped by rows and columns | Orders by status (rows) and by pickup day (columns) |
| Joined | Several report blocks side by side | Compare data from different report types |
Build a summary report
Orders by status
- 1In the Brew and Bean app, open the Reports tab and click New Report.
- 2Search for
Coffee Ordersin the report type list. Select it and click Continue (or Start Report). - 3Report Builder opens with a preview. In the left panel, under Outline, you can add columns. Add Coffee Order Name, Customer, Status, Pickup Time and Total.
- 4In Filters, leave the date range open and set Show Me to All coffee orders. Click Add Filter and choose Status, operator not equal to, value
Cancelled. - 5Drag
Statusinto Group Rows (or use Add Group in the Outline). The report becomes a summary report with one group per status. - 6Click the dropdown on the Total column and choose Summarize, then Sum. Subtotals appear for each status.
- 7Click Save & Run. Name it
Orders by Statusand save it in a new folder,Brew and Bean.
Rows are grouped under Received, Preparing, Ready and Picked up. Each group shows its record count and the Sum of Total. At the bottom is a grand total across all groups.Show a chart
In the report builder, click Add Chart. Choose a bar or donut chart and pick what to show on the axes. A chart saved on the report can later be used on a dashboard.
Filters, buckets and formulas
Tools inside Report Builder
| Tool | What it does | Example |
|---|---|---|
| Standard filters | Date range, Show Me (all records, my records) | Orders in the last 7 days |
| Field filters | Conditions on a field | Status not equal to Cancelled |
| Filter logic | Combine filters with AND, OR | 1 AND (2 OR 3) |
| Bucket field | Groups values into your own categories without a new field | Total: Small under 200, Medium 200 to 500, Large above 500 |
| Summary formula | A calculated column across groups | Average order value = Total sum divided by record count |
| Row limit | Keep only the top or bottom N rows | Top 5 orders by Total |
Add a bucket column
- 1Open the
Orders by Statusreport and click Edit. - 2In the Outline, click the dropdown at the top of the column list and choose Add Bucket Column.
- 3Choose the Total field as the source. Name the bucket
Order Size. - 4Create three buckets: Small (less than 200), Medium (200 up to 500) and Large (500 and above). Click Apply.
- 5Group by
Order Sizeas a second grouping, or put it in a matrix. Save.
Joining items to orders: a custom report type
The Coffee Orders report can show order fields only. To report on which menu items sell most, you need Order Items together with their orders and menu items. For that, create a custom report type.
Create a custom report type
- 1In Setup, type
Report Typesin Quick Find and open Report Types. Click New Custom Report Type. - 2Primary Object:
Coffee Orders. Report Type Label:Coffee Orders with Order Items. Category: Other Reports (or any). Stage: Deployed. Click Next. - 3Click the box under the primary object to add a related object. Choose Order Items. Choose A to B relationship, where every Coffee Order must have at least one Order Item, or choose the relationship that allows orders without items.
- 4Save. Open Reports and click New Report, then find your new report type.
- 5Add the columns Order Item Name, Quantity, Line Total and the related menu item's name, then group by Menu Item and summarise Quantity (Sum). Save as
Items Sold.
Note that to show the menu item name from a lookup, you may need to choose columns from the related object in the report type's field layout. If you do not see a field you expect, edit the report type and check which fields are added.
Build a dashboard
A dashboard is made of components: chart types such as bar, column, line, donut, funnel, gauge (progress to a target), metric (a single number) and table. Each component takes data from one source report.
Brew and Bean daily dashboard
- 1Open the Dashboards tab and click New Dashboard. Name it
Brew and Bean Daily, choose the folder, and click Create. - 2Click + Component, choose the report
Orders by Status, click Select. In the editor, pick a Donut chart, show Record Count by Status, and click Add. - 3Add another component from the
Items Soldreport, choose a Horizontal bar chart with Menu Item on the axis and Sum of Quantity as the value. - 4Add a Metric component from
Orders by Statusshowing the Sum of Total. Click its title and set a clear name,Revenue (excluding cancelled). - 5Click Save, then Done. Open the Dashboard properties (gear icon) and check View Dashboard As.
- 6Click Refresh to load the latest data, or set a Subscribe schedule so it is emailed at a regular time.
View Dashboard As (the running user) is a common interview topic. The dashboard can run as the person viewing it, so everyone sees only the records they can access, or as a specified user, so everyone sees the same numbers even if their own access is narrower. The first is safer for sensitive data; the second is useful for a shared team view. Choose carefully, because a specified-user dashboard can show a viewer data they could not otherwise see.
Folder sharing matters
Reports and dashboards live in folders. A user needs access to the folder and to the underlying data (through object and record security) to see results. Report folders are shared with roles, groups or users with a viewer, editor or manager role.
Good reporting habits
Before you share a report
- The report name and description say what it answers.
- Cancelled or test records are filtered out where they should be.
- Date filters are set deliberately, not left on 'All time'.
- Column names are clear and totals are summarised where useful.
- It is saved in a shared folder with the right people.
- Each dashboard component has a title and a clear purpose.
How this comes up in interviews. Expect: "Report formats?", "What is a custom report type?", "What are bucket fields?", "What is a running user in a dashboard?" Practise saying when you would use each format, using a real example.
I'm a Salesforce admin for [business, e.g. a coffee shop chain]. Our objects are [list objects and key fields].
The manager asks: "[business question, e.g. which items sell best on weekends?]".
Tell me: which report type or custom report type I need, which format (tabular, summary, matrix or joined), the filters, groupings and columns, and which dashboard component would show it best. Put the steps in a numbered list in Salesforce Lightning Report Builder terms.What to expect: Check that the answer uses the right grouping and a report type that actually includes your objects. If your org differs, adapt the names.
Try it: Your own dashboard
1. Create a matrix report of Coffee Orders: rows by Status, columns by Pickup Time grouped by day, showing Sum of Total. 2. Create a report that lists the Top 5 customers by total spend (use the row limit). 3. Add both to the dashboard, set a gauge for revenue with a goal of your choice, and rename every component with a clear title. 4. Change View Dashboard As to a specified user, then explain in one sentence what a viewer could see that they otherwise could not.
Key takeaways
- A report is a saved question; a dashboard shows many reports as charts and tables.
- Formats: tabular for lists, summary for groups, matrix for two-way grouping and joined for multiple blocks.
- Use filters, bucket fields and summary formulas before exporting data to a spreadsheet.
- Custom report types join objects the way you need.
- Dashboards can run as the viewing user or a specified user; choose with security in mind, and share folders deliberately.
Check yourself
Finishing the quiz marks the lesson as done.
1. You want to see orders grouped by status with a sum of the total for each. Which format fits best?
2. What does a bucket field do?
3. You need a report across Coffee Orders and their Order Items, but the standard type does not offer it. What do you do?
4. A dashboard is set to View Dashboard As a specified manager. What is a risk?
5. Which dashboard component shows a single number like total revenue?
Saved on this device. Create a free account to keep it on every device.
Practise this with Sam
A real mock interview, out loud, with an honest scorecard. Free to start.