How to Save Dashboard Space in Analytics Cloud

June 11, 2015 Appirio

By Surbhi Jain

techbl

Salesforce’s Analytics Cloud — better known as Wave — was released at Dreamforce in 2014. Since then, many sales teams have found it to be a great way to unlock useful data. But making sure sales professionals get great-looking dashboards requires some technical know-how.

It’s common that a sales rep would want to see a metric or measure segmented by several different dimensions. For instance, we might be interested in seeing revenue by customer, but we might also want to view revenue by product, or revenue by geography. In the following example, imagine a sales analyst wants to see a pipeline amount by region and team. For the first approach, it’s easy to use two charts and provide one visualization:

analyticscloud

This kind of visualization is easy to build and is mobile-compatible. The problem with this approach is that it takes quite a bit of real estate. This is particularly troublesome if we have more dimensions to add.

Using static steps

A key performance indicator (KPI) is typically used to view the same measure across various dimensions, or different measures for the same dimension. So in such a case, instead of creating separate charts for different groups/measures/filters/sorting/limits, we can have a single chart that changes the group/measure/filter/sorting/limit according to our selection from a toggle/list widgets.

This can be achieved using a static step. A static step contains an array of values, and these values can be passed to other steps in a dashboard using binding. Toggle and list can be used as a widget to hold the static steps.

The following are the different scenarios we come across while binding a step to a static step:

1)      When the step uses single dataset:

Suppose we need to group a step based on our selection in a static step. In this case, we can simply write the static step like this:

[snippet]”step_group”: {

“isFacet”: false,

“values”: [

{ “value”: [ “Region__c” ],

“display”: “Region”

},

{ “value”: [ “Team__c” ],

“display”: “Team”

}],

“start”: [  “Region__c” ],

“selectMode”: “single_required”,

“useGlobal”: false,

“type”: “static”,

“isGlobal”: false

}[/snippet]

And in the main step, pass the selection of this step to groups option like this:

[snippet]”groups”: “{{selection(step_group)}}”[/snippet]

See the following screenshots:

analyticscloud2

 

analyticscloud3

 

2) When the step uses multiple datasets:

Suppose we need to union data of two datasets and then group the results based on the static step selection. The dilemma is in figuring out what value we should provide in the static step values because the dimension names in the two datasets will be different.

We can handle this by adding dummy fields to the values array in static step, like this:

[snippet]”step_group”: {

“isFacet”: false,

“values”: [

{ “value”: [ {  “dim1” : “Region1__c”,

“dim2” : “Region2__c” } ],

“display”: “Region”

},

{ “value”: [ {  “dim1″ : “Team1__c”,

“dim2” : “Team2__c” } ],

“display”: “Team”

}],

“start”: [{ “dim1” : “Region1__c”,

“dim2” : “Region2__c” }],

“selectMode”: “single_required”,

“useGlobal”: false,

“type”: “static”,

“isGlobal”: false

}[/snippet]

For using data from two datasets, we need to use PigQL:

[snippet]”pigql”: “a = load “Dataset1”;

a = group a by ({{ single_quote(value(field(selection(step_group), ‘dim1’))) }};

a = foreach a generate {{ single_quote(value(field(selection(step_group), ‘dim1’))) }} as ‘Dimension’, sum(‘Amount’) as ‘sum_Amount’, count() as ‘count’;

b = load “Dataset2”;

b = group b by ({{ single_quote(value(field(selection(step_group), ‘dim2’))) }};

b = foreach b generate {{ single_quote(value(field(selection(step_group), ‘dim2’))) }} as ‘Dimension’, sum(‘Amount_USD’) as ‘sum_Amount’, count() as ‘count’;

result = union p,q;”[/snippet]

Note: Make sure you provide groups and measures in compact form of the step, and the measure alias should start with “<operation>_”,  like “sum_”, “avg_”.

 

Previous Article
Tips for Enabling Salesforce Live Agent
Tips for Enabling Salesforce Live Agent

By Urminder Singh Salesforce Live Agent allows your organization to connect with your customers or visitors...

Next Article
Best Practices for Using Medallia Survey Questions
Best Practices for Using Medallia Survey Questions

By Elliott Johnson Intent doesn’t always equal impact. The space between what we ask in a survey and what w...