How-To: Control Dashboard Colors for Non-Picklist Fields

For this post, we will use an example of a formula field that calculates the number of days that an opportunity has been open.  Ideally, we would be able to create a dashboard that displays opportunities split into three groups (< 30 days, 30-60 days, > 60 days) and each group would be displayed in a specific color on the dashboard. However, Salesforce Analytics only provides color display choices for picklist data fields. All other data types are forced into using a default color scheme for each distinct group/value. As a result, we can create the dashboard, but not using the colors we would like (e.g. green, yellow, green).

 

Dashboard with Default Colors

 

In order to generate the above dashboard, we created a ‘bucket field’ in order to control which group each opportunity is counted toward.  In order to get the resulting dashboard colors we are looking for, we can instead create a picklist field that corresponds to the different value ranges we wish to group by.  Example of this picklist field setup is below:

 

Picklist Setup

 

Note that you should make sure to assign Chart Colors to the picklist values in order to get the desired result for the dashboard that utilizes this new picklist field.

Now we need to create a set of workflow rules/actions in order to update this picklist value based on the value of our existing age formula field.  In this scenario, we would need three separate workflow rules and corresponding actions (one for each picklist value).

Example Workflow Rule:

 

Workflow Rule

 

Example Workflow Field Update Action:

 

Workflow Action

 

After all of the appropriate workflow rules/actions have been added, we can update the source report for our dashboard to use the new picklist field instead of the existing bucket field for grouping.  The existing dashboard should update and will now display using the appropriate colors that we specified for each group.

 

Dashboard with Custom Colors

 

This solution is a bit of work for accomplishing something seemingly simple.  However, until Salesforce introduces the ability to manage dashboard colors directly as part of the dashboard setup, this is the most logical workaround.  If you have any questions regarding this solution, please post your question in the comments below.

This entry was posted in Technology and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>