Exploring the visualisation options in CRM Analytics

Swapnil Rawat
9 min readOct 31, 2023

--

An analyst comes across a variety of use cases for visualisation on a day to day basis. CRM Analytics has a good number of visualisation options to meet your needs.

But can we apply different visualisations for the same data ?

What are the considerations to keep in mind while selecting a chart type ?

To what extent can I customize my visualisations in CRM Analytics ?

This article is my to attempt answer all these questions.

Prerequisites

We will be using a CRM Analytics-enabled Developer Edition trial org provided by Trailhead. Use the following link to sign up for the trial org :

trailhead.salesforce.com/promo/orgs/analytics-de

This trial org is already configured with Analytics Studio and provides us with a sample dataset named DTC Opportunity inside My DTC Sales app.

Query to be used

Before we start exploring various chart types and options available in CRM Analytics, we will build a query using DTC Opportunity dataset to Calculate and Visualise average Amount for every Stage across Open opportunities, having Account Type as Customer.

I’ve already prepared a query for the above use case in the following article :

You can go through the entire article to get a basic understanding of various Assets in Analytics Studio. Otherwise, you can simply skip to the Lens section and follow the steps mentioned to build the query required for our use case.

Bar Chart

Bar Chart is the default visualisation in Analytics Studio. A bar chart requires at least 1 measure in your query.

Avg of Amount is used as Bar Length. Stage is used to group data into Bars.

Bar Length option determines the measures that will be visualised on the bar chart. In general, these measures are results of some aggregate function applied on a dataset column.

Selections made under Bars option are dimensions to be used for grouping our data.

You can have multiple selections for both Bar Length and Bars options. Alternatively if you want to hide certain selections from your chart, you can do so using the dropdown menu in front of individual fields. Hidden fields are added under Unused Fields option.

Sort, Hide, Delete and Rename options in field dropdown menu

Trellis option will be explained in Trellis section of this article.

How do I change visualisation type ?

On the right hand side, click on Charts icon to view the various chart types.

Hovering on the Charts icon displays “Charts” text
Chart Types in CRM Analytics

Available chart types are displayed as square tiles under the Charts tab. Every chart type has some required number of measures and groupings. You can check the minimum number of measures or groupings to be added for each chart type by hovering over the respective tile.

Hovering on chart tiles displays the minimum requirements for that particular chart type

Let’s try changing our chart type and observe the behaviour. While the Charts tab is open, click on the chart tile named “Line” to change the chart type to Line.

Line Chart

A line chart requires at least 1 measure in your query. On the left hand side, notice how the options under Data tab have changed. The data is still grouped by Stage and our chart still visualises the Avg of Amount measure.

If we compare the data tab of a Line chart to that of a Bar chart, you can notice the following differences :

  1. Instead of Bar length option, Avg of Amount measure is mapped to Y-Axis option
  2. Instead of Bars option, Stage is mapped to X-Axis option
  3. An additional Lines option is available
Avg of Amount is used as Y-Axis. Stage is used as X-Axis.

Here are the key takeaways from the steps we’ve performed till now :

  1. Every chart type has its own set of options that determine the number of measures and groupings to be used for visualisation
  2. Every chart type has some required number of measures and groupings, if the specified criteria is not met then your Lens will not be able to generate the selected visualisation
  3. Even if you change the chart type, the measures to be displayed and the groupings to be used remain the same. Selections made for the options under the data tab from your previous chart are mapped to the chart options for your new chart accordingly.

You might have also noticed that under data tab, currently there are no selections made for the Lines option. Lines option allows us create sub groups in our data based on some column, these sub groups are displayed as individual lines on the Line chart. Let’s add some column for the Lines option and check the impact on our Line chart.

To add a selection for Lines, click on the ‘+’ option and search for Product Family field.

Select Product Family field, this will add multiple lines to our Line chart. Each line representing a Product Family value.

Product Family used to segregate the Line chart

Remember, Lines is an additional option exclusive to the Line chart. When we add columns for Lines option, sub groups are created and hence behind the scenes our query gets modified as well. So, before we move on to the next chart type, make sure you delete Product Family from Lines option.

While the Charts tab is open, click on the chart tile named “Donut” to change the chart type to Donut.

Donut Chart

A Donut chart requires at least 1 measure in your query. Additionally we also need either 0–1 groupings if trellis is disabled or 0–3 groupings if trellis is enabled.

Avg of Amount is used as Segment Size. Stage is used to group data into Segments.

Trellis

Trellis provides us the option to segregate our data into groups based on the selected columns and represent the grouped data in a tabular format. Then for each of the resultant groups, an individual chart is created. Trellis is available for all the chart types discussed in this article. Let’s add some column in the Trellis option and see this in action for our Donut chart.

To add a selection for Trellis, click on the ‘+’ option and search for Created Date field.

Since Created Date is a date time field, you need to specify the type of grouping to be used. Select Year-Month, this will group the dataset records based on the year and month of creation.

Grouping options available for a date time field
Tabular representation using Trellis

Just like Lines option when we add columns for Trellis option, sub groups are created and hence behind the scenes our query gets modified. So, before we move on to the next chart type, make sure you delete Created Date from Trellis option.

While the Charts tab is open, click on the chart tile named “Waterfall” to change the chart type to Waterfall.

Waterfall Chart

A Waterfall chart requires at least 1 measure in your query. Additionally we also need either 0–1 groupings if trellis is disabled or 1–3 groupings if trellis is enabled.

Avg of Amount is used as Bar Length. Stage is used to group data into Bars.

Formatting

On the right hand side, click on Roller Brush icon to view the various formatting options available for your chart.

Hovering on the Roller Brush icon displays “Formatting” text

You can modify the formatting options and customise the chart to suit your needs.

Title, Font Size, Alignment and Chart specific properties on the Formatting tab

History

On the right hand side, click on Clock icon to view the query and visualisation history for your lens.

Hovering on the Clock icon displays “History” text

The history tab keeps track of all the modifications you’ve made to the current lens. Here you can find all the query related changes and a preview of all the charts used for the current lens. If required you can select and get back to any older state of your visualisation.

Visualisation History

Suggested Charts

On the right hand side, click on Charts icon to get back to Charts tab. Then click on Suggested Charts tab. You’ll get a preview of all the suggested charts based on your query.

Suggested Charts

Table Mode

CRM Analytics provides three different options for visualising our data in the Table Mode. Let’s have a look at them one by one.

You can find the Table icon in the top right corner of the canvas area. Click on the Table icon to see the types of tables available in CRM Analytics.

Hovering on the Table icon displays “Table Mode” text
Options for table types in Table Mode

Now we need to specify the type of table to be used. You can select any one of the following :

  1. Compare Table
  2. Pivot Table
  3. Values Table

Let’s start with Compare Table, so select it from the three available options.

Compare Table

Avg of Amount gets added as a selection under Columns. Stage is added in Group By

Let’s add another column to create subgroups for our dataset.

To add a selection for Group By, click on the ‘+’ option and search for Industry field.

Select Industry field. Now, you can see that our data is grouped using both Stage and Industry.

Keeping the Columns and Group By selections as is, click on the Table icon and change the table type to Pivot Table.

Pivot Table

Notice that even though the Columns and Group By selections are the same, Pivot Table is much more suitable for a query having multiple groupings.

Now, click on the Table icon and change the table type to Values Table.

Values Table

Oops … as soon as we switched to Values Table, we lost the Avg of Amount measure and both of our groupings! Another thing to note is that previously the default query limit was 2000 and not it is changed to 100.

No need to worry tho. We can easily revert to any of the previous tables by looking up in the History tab.

The rightmost icon on the top right of canvas area is for table options. Click on this icon to view Table Options.

Table Options

These table options can be used to calculate metrics like totals, subtotals, column totals and row totals.

Show Totals and Show Subtotals for a Compare Table
Show Column Totals and Show Row Totals for a Pivot Table
Show Totals for a Values Table

Thanks for following this blog till now! Up next will be a series of articles focused on using SAQL (Salesforce Analytics Query Language).

--

--

Swapnil Rawat

24 | Indian | VIT Chennai | sketching | dog lover | harambe died for your sins | 2020 is love | Au milieu de nulle part | surat ✈️ pune > mumbai