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



Before the Winter '20 release, queries were called steps.

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? With queries. To learn about queries, check out the following video.

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 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 query that calculates the value for this number widget.
  2. In the list of datasets, select DTC Opportunity. 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 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 Filters, click + under the Filters tab, 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 - Won and 09 - Lost.
  6. To apply the filter, click Add.
  7. To label the query, click the Edit button next to Untitled Query and then enter Open Opp Amount. Edit step label Tip Tip Query labels are important because they help you identify the query when you want to apply it to a widget. Specify the label while you create the query because Analytics generates the ID based on the label. After creating the query, you can’t change the ID, unless you edit the JSON. (Analytics uses IDs to identify queries 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 increase 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 query 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 query, click Step Actions button and then Clone Step button. Notice that the explorer retains the query. Let’s change the filter to show won opportunities instead of open opportunities in this cloned query.
  3. Click the Filters tab, and then click Stage filter. The cloned step retains the previous filter.
  4. Remove all selections in the Stage filter, and then select only 08 - Won. Of all possible filter values for the Stage field, the
  5. To apply the new filter, click Update.
  6. To distinguish this query from the other one, set the label to Won Opp Amount.
  7. To create the query, click Done. Excellent! Now it’s time to apply this new query to the second number widget.
  8. To view the query panel, click an empty space at the bottom of the dashboard canvas. The query panel shows all queries defined in the dashboard, even if they aren’t used by any widgets. The panel shows the IDs and labels.
  9. Drag the new Won Opp Amount query 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 increase the number size to 20.
  11. While you’re at it, build the third number widget to show the lost opportunities. Select 09 - Lost as the stage filter, enter Lost Opp Amount as the label, change the widget title to Lost Opportunities, select Shorten number, and increase 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.

Keep learning for
Sign up for an account to continue.
What’s in it for you?
  • 1 in 4 land a new job
  • 50% receive a promotion or raise
  • 80% learn new technologies that boost their resume
  • 66% say it increases productivity
Source: Trailblazer Community Impact Survey 2019