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:
- In the Dataset list, click the worldwide_sales_with_flags dataset to explore it.
- Under Measures, click Count of Rows, and select
Value to change the chart to
display Sum of Value.
- Under Group by, click , then select
Country to group your chart
- Click to open chart properties, and then enter a title:
WORLDWIDE ACCOUNT VALUES for
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).
- Click to go to SAQL mode.
- Add ,first('flag_img_url') as 'flag_img_url' to the foreach statement.
Click Run Query.
You should see a new column (flag_img_url) with the URLs for each flag.
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.
Next we’ll add a cool type of gauge called a polar gauge:
- Click to open the chart menu, then select Polar Gauge.
and enter (or copy and paste) the following breakpoints:
- Min: 0
- Medium: 10000000
- High: 30000000
In other words, set Min to 0, Medium to 10 million, High to 30 million, and Max to 100 million.
Click Trellis to open that panel, then set the following values:
- Type: Wrap
- Number of charts per line: 6
Click Polar Gauge and select Use Icons.
Click and confirm the following values:
- Title: worldwide_sales_with_flags
- 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.