Build Reports and Dashboards
Learning Objectives
After completing this unit, you’ll be able to:
- Build reports around the new data on your competitors.
- Explain how to create a competitive insights dashboard.
Introduction
You’ve created two new fields with validation rules. Now you can get to the heart of this whole endeavor: setting up analytics that give you insight into which competitors your company runs up against most often and why you lose to rivals.
Update Opportunities with Competitor and Lost Reason Values
The custom fields you created in Unit 2 do not have any data in them yet. You need data in those new fields to create reports. Here’s how to update a few opportunities in your sandbox or Trailhead Playground so you can build the reports.
- Click and select your Sales application.
- Click the Opportunities menu item.
- Select the All Opportunities list view.
- Click and then click Clone.
- Name the new list
Competitor Updates
.
- Verify that Only I can see this list view is selected, and click Save.
- Click and then click Select Fields to Display.
- Add Competitor and Lost Reason to Visible Fields.
- Click Save.
- Click Close Date to sort the list view by this field, in descending order.
- The List View is an editable table. Pick a row, hover over the Stage field, and click the pencil icon.
- Update the stage to Closed Lost.
- Using the same in-line editing functionality, add any Competitor and Lost Reason values to several opportunities in the table.
- Once you’ve updated several opportunities, click Save.
Report 1: Won and Lost Opportunities by Competitor
Now that you’ve got some data, you can create a report.
- Click and select your Sales application.
- Click the Reports menu item, and click New Report.
- Choose Opportunities on the left sidebar, and then select the Opportunities report type on the right.
- Click Continue.
- In the outline pane, add Competitor and Stage group rows.
- Click Filters, and add a new filter for the Stage field.
- Select equals for the Operator.
- Select the values Closed Won and Closed Lost.
- Click Apply.
- Click Add Chart.
- Click in the upper right corner of the chart to edit the chart properties.
- Choose Stacked Bar as the chart type.
- Scroll down a bit and update the X-Axis to Record Count.
- Click again to close the chart properties pane.
- Click Preview. And if the preview looks good, click Save & Run.
- Report Name:
Opportunities by Competitor
Click Save.
Report 2: Lost Reasons by Competitor
In this second report, group Lost opportunities by their Lost Reason value. Here’s how.
- Follow steps 2–4 above to create a new report with the type Opportunities.
- Add groups for Competitor and Lost Reason.
- Add a filter for Stage equals Closed Lost.
- Click Apply.
- Add a horizontal bar chart similar to the first report, setting the chart type to Stacked Bar and the X-Axis to Record Count. Your chart should look similar to this.
- Click Preview. And if the preview looks good, click Save & Run.
- Report Name:
Lost Reasons by Competitor
Click Save.
Report 3: Win/Loss Ratio by Competitor
For the third report, you calculate the opportunity win/loss ratio by competitor with a custom report formula column.
- Begin by taking the same steps to create a new report with the Opportunities report type.
- Add a group for Competitor.
- Click Filters, then Opportunity Status, and select Closed from the picklist. Click Apply.
- Click Outline.
- In the Columns section, click | Add Summary Formula Column.
- Enter
Win Rate
for the Column Name, select Percent for Formula Output Type and 0 for Decimal Places.
- Enter
WON:SUM/CLOSED:SUM
for the Formula.
- Click Apply.
- Repeat steps 5 - 8 to create a second formula field, but this time name the field
Loss Rate
and use the formula(CLOSED:SUM - WON:SUM)/CLOSED:SUM
- Optionally, click Detail Rows at the bottom of the preview pane to hide the individual rows and only show the report summary data.
- Click Run to see the full report results, and then click Save to save the report with the name
Win / Loss by Competitor
. Here’s a sample of what this looks like.
Build a Competitive Analysis Dashboard
Let’s now add our three new reports to a brand-new dashboard.
- From the Dashboards menu item, click New Dashboard.
- Name the dashboard
Competitive Analysis
and place the dashboard in a folder of your choice.
- Click + Widget, then Chart or Table.
- Select the Opportunities by Competitor report that you created earlier. Click Select.
- For Display As, select Horizontal Stacked Bar Chart, for Y-Axis choose Competitor, and for X-Axis choose Record Count.
- Click Add.
- Click + Widget again to add a second component, and select your Lost Reasons by Competitor report. Click Select.
- For Display As, select Horizontal Stacked Bar Chart, for Y-Axis choose Competitor, and for X-Axis choose Record Count. Click Add.
- Click + Widget again, this time using Chart or Table to select the Win / Loss by Competitor report. For Display As, select Lightning Table. Configure the table by adding the Competitor field in the Groups section, and adding Win Rate in the Measure Columns section. In the Measure Columns section, click to remove the Record Count column from the table. Click Add.
- Move or resize the dashboard components to your liking. Here’s an example.
- Click Save, and then click Done to see the new dashboard in action.
Resources
- Build a Report in Lightning Experience (Salesforce Help Article)
- Build a Lightning Experience Dashboard (Salesforce Help Article)