Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Create a Lens Using a Polar Gauge Chart with Chart Icons

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 Bar Length, 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 Bars, 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 formatting 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. To exit the Table mode and go to the Query mode, click SAQL mode icon.
  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.
  2. From the Gauges category, select Polar Gauge.
  3. Click Chart properties icon and then Range Values and enter (or copy and paste) the following values:
    1. Min: 0
    2. Max:  100000000[Alt text: analytics explorer polar gauge chart]
  1. In the Data tab, rename column A to Sum of Value.
  2. Click Conditional Formatting and and select Sum of Value as the column for setting the conditional formats. Add 3 bins as follows < than 10000000, 10000000 < 30000000, and > 30000000. Select distinct colors for each bin's low and high values. [Alt text: analytics gauge chart color coded bins]
  3. Click Trellis to open that panel, then set the following values:
    1. Type: Wrap
    2. Number of charts per line: 6
  1. [Alt text: analytics gauge chart trellis property]
  2. Click Polar Gauge and select Use Iconsanalytics gauge chart use icons property
  3. Click Save 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.

Salesforce 도움말에서 Trailhead 피드백을 공유하세요.

Trailhead에 관한 여러분의 의견에 귀 기울이겠습니다. 이제 Salesforce 도움말 사이트에서 언제든지 새로운 피드백 양식을 작성할 수 있습니다.

자세히 알아보기 의견 공유하기