trailhead

Explore the Data

Gauge charts are a great way to track your company’s progress toward meeting specific goals. You’ve just put together summary numbers for a high-level presentation on total account value in the countries or regions where your company operates. You’d like to highlight how close (or how far!) the company is from reaching its goal on this important metric.

To log in to the Analytics-enabled developer org when you take the challenge at the end of this page, select Log into a Developer Edition from the connection menu. To log in and play any time, go to login.salesforce.com.

First, set up the exploration:

  1. In the Dataset list, click the worldwide_sales_with_flags dataset to explore it.
  2. Under Measures, click Count of Rows, and select Sum, then Value to change the chart to display Sum of Value.
    analytics explorer add sum-of-value measure
  3. Under Group by, click add grouping icon, then select Country to group your chart by country.
    analytics explorer group by country
  4. Click Chart                                          properties icon to open chart properties, and then enter a title: WORLDWIDE ACCOUNT VALUES for a title.
    analytics explorer bar chart title property

Add the Image URLs to Your Exploration

Remember back to the step where we worked with the CSV dataset? In that step we included the image URLs, but to make them available in your lens, you need to bring them in with a little SAQL (Salesforce Analytics Query Language).

  1. Click SAQL mode icon to go to SAQL mode.
  2. Add ,first('flag_img_url') as 'flag_img_url' to the foreach statement.
  3. Click Run Query.
    You should see a new column (flag_img_url) with the URLs for each flag.
    analytics saql mode query showing results table

You could use any non-grouping SAQL function that preserves the URLs as strings, not just first(). For more information about SAQL, see the Analytics SAQL Reference.

Create the Polar Gauge Chart and Add Flags

Next we’ll add a cool type of gauge called a polar gauge:

  1. Click Chart menu icon to open the chart menu, then select Polar Gauge.
  2. Click Chart properties icon and then Breakpoints and enter (or copy and paste) the following breakpoints:
    1. Min: 0
    2. Medium: 10000000
    3. High:  30000000
    4. Max:  100000000
      In other words, set Min to 0, Medium to 10 million, High to 30 million, and Max to 100 million.
    analytics explorer polar gauge chart
  3. Click Trellis to open that panel, then set the following values:
    1. Type: Wrap
    2. Number of charts per line: 6
    analytics gauge chart trellis property
  4. Click Polar Gauge and select Use Icons.
    analytics gauge chart use icons property
  5. Click Save icon and confirm the following values:
    1. Title: worldwide_sales_with_flags
    2. App: My Private App

You’ve got some awesome looking gauges there! Now let’s give this visualization a little more class with a dark theme.

Time Estimate
Topics
retargeting