đź“Ł Attention Salesforce Certified Trailblazers! Link your Trailhead and Webassessor accounts and maintain your credentials by December 14th. Learn more.
close
trailhead

Add Key Metrics to Evaluate Your Business

Learning Objectives

After completing this unit, you’ll be able to:
  • Explain when to use number widgets.
  • Add a number widget to a dashboard.

Calculate Key Metrics to Measure the Success of Your Business

One of the key purposes of a dashboard is to give you quick insights into your business. That usually means providing key measurements of your business, such as the following:
  • Total number of deals
  • Average deal size
  • Average case resolution time
  • CSAT score
  • Total opportunity value generated by a marketing campaign

Laura wants reps and their managers to know the value of opportunities currently in the pipeline, and how much was won as well as lost. The best way to represent those metrics is with number widgets.

Let’s create the following number widgets in our dashboard. The number widgets in the Sales Performance dashboard show the total value of open, won, and lost opportunities.

We calculate the value for each widget based on the Amount field in the DTC Opportunity dataset. (This dataset comes with the Analytics Developer Edition org that you signed up for.) We apply different filters to get the total open, won, and lost opportunity amounts. For example, to get the total amount for only open opportunities, we have to filter out the opportunity records that are won or lost.

So where do we create these calculations? In steps. To learn about steps, check out the following video (English only).

How Much Open Opportunity Is in the Pipeline?

Laura wants the dashboard to show the total value of open opportunities in the pipeline. Let’s show this metric in the first number widget.
  1. While your Sales Performance dashboard is in edit mode, hover over the center of the top number widget and click 123 Number.
    he "123 Number" button appears appears inside the number widget when you hover over it.
    Tip

    Tip

    To put a dashboard in edit mode, click the Edit button in the dashboard toolbar. Edit button in the dashboard toolbar.

    A wizard opens. Use the wizard to build a step that calculates the value for this number widget.
  2. In the list of datasets, select DTC Opportunity.
    Note

    Note

    If you get an error that says the data is unavailable, click Close and then 123 Number again. This error happens if the dataset hasn’t been created yet. When you sign up for an Analytics DE org, this dataset is created for you. Sometimes you have to wait a couple of minutes.

    If no error occurs, the explorer opens, showing a visual representation of the step query. The default query calculates the total number of records in the selected dataset. The explorer shows the total number of rows in the selected dataset as a horizontal bar chart, by default.

    To show the total value of opportunities in the pipe instead, let’s modify this query. Since each row in the dataset represents an opportunity, add the opportunity amount of all the rows. To get that, let’s change the count of records to the sum of opportunity amounts.

  3. Click Count of Rows under Bar Length, and then select Sum | Amount.
    The explorer shows a list of aggregate functions, like count, sum, and average, as well as the measures on which you can perform these calculations.

    To show the amount for only open opportunities, let’s add a filter that excludes closed won and closed lost opportunities.

  4. Click + under Filters, and then select Stage.
    Tip

    Tip

    Enter stage in the search box to quickly locate the field.

    The Stage field shows under Dimensions when you add a filter.
  5. Select all values, except 08 - Closed Won and 09 - Closed Lost.
  6. To apply the filter, click Add.
  7. To label the step, click the Edit button next to Untitled Step and then enter Open Opp Amount.
    Edit step label
    Tip

    Tip

    Step labels are important because they help you identify the step when you want to apply it to a widget. Specify the label while you create the step because Analytics generates the step ID based on the label. After creating the step, you can’t change the ID, unless you edit the JSON. (Analytics uses step IDs to identify steps behind the scenes—in the dashboard JSON.)

  8. Click Done.
    Congrats! You created your first number widget. Unfortunately, you can’t see the widget title and some digits are truncated. Let’s fix these issues now by modifying the widget properties. The number widget shows the total value of open opportunities for the team.
  9. Select the widget to show its widget properties and then change the Title property from Sum of Amount to Open Pipeline, select Shorten number, and decrease the number size to 20.
    The new title appears on the left of the widget.

    When you preview the dashboard, you can now view the new title and the shortened number inside the widget. To preview, click Preview button in the dashboard toolbar.

  10. Save the dashboard.
    As you can see below, our new title clearly indicates what the number represents and uses terminology that’s familiar to users viewing the dashboard. Nice work.After applying the widget property changes, the number rounds up to the nearest million and the title changes.

How Much Business Has Already Closed?

In addition to the Open Pipeline metric, you also want to show the total value of won opportunities. To save time creating the second metric, clone the Open Opp Amount step that you just created, and then change the filter.
  1. Select the Open Pipeline widget in the dashboard.
    The widget-level buttons appear at the bottom of the dashboard designer.The widget buttons appear at the bottom right corner of the dashboard designer.
  2. To clone the step, click Step Actions button and then Clone Step button.
    Notice that the explorer retains the step query. Let’s change the filter to show won opportunities instead of open opportunities in this cloned step.
  3. Click the Stage filter.
    The cloned step retains the previous filter.
  4. Remove all selections in the Stage filter, and then select only 08 - Closed Won.
    Of all possible filter values for the Stage field, the "08 - Closed Won" value is selected.
  5. To apply the new filter, click Update.
  6. To distinguish this step from the other one, set the step label to Won Opp Amount.
  7. To create the step, click Done.
    Excellent! Now it’s time to apply this new step to the second number widget.
  8. To view the steps panel, click an empty space at the bottom of the dashboard canvas.
    The steps panel shows all steps defined in the dashboard, even if they aren’t used by any widgets. The panel shows the step IDs and labels.
  9. Drag the new Won Opp Amount step on top of the second number widget.
     Drag a step on top of a widget to apply it.
    Great. This widget now shows the total value of all won opportunities.
  10. Select the new widget and, in the widget properties, change the Title widget property to Won Opportunities, select Shorten number, and decrease the number size to 20.
  11. While you’re at it, build the third number widget to show the lost opportunities. Select 09 - Closed Lost as the stage filter, enter Lost Opp Amount as the step label, change the widget title to Lost Opportunities, select Shorten number, and decrease the number size to 20.
  12. Save the dashboard.

Take a bow! With the first two number widgets, you’ve just given Laura the ability to see how much money is in the pipeline and how much is in the bank. With the third, she knows how much money was lost to competitors. Don’t worry that some of the titles are truncated while editing the dashboard. When you preview it, you can see the complete titles.The Sales Performance dashboard now shows two number widgets, showing the total value of open and won opportunities.

In the next unit, you create a chart that helps Laura compare sales reps and a table that lets her see their individual opportunities.

retargeting