KNOWLEDGE BASE

Creating a Custom Color Scale for Varying Ranges of Data


Published: 08 Feb 2013
Last Modified Date: 21 Aug 2017

Question

Create a color scale that separates data into five varying ranges.

Environment

Tableau Desktop

Answer

This example uses Superstore sample data to compare varying ranges of Sales. 

1. Select Analysis > Create Calculated Field
2. Name the field. In this example, it is named Five Colors. Enter a calculation similar to the following, then click OK:
IF SUM(Sales)<20000 THEN 'GRAY'
ELSEIF SUM(Sales)>=20000 AND SUM(Sales)<90000 THEN 'LIGHT RED'
ELSEIF SUM(Sales)>=100000 AND SUM(Sales)<150000 THEN 'DARK RED'
ELSEIF SUM(Sales)>=150000 AND SUM(Sales)<300000 THEN 'LIGHT BLUE'
ELSE 'DARK BLUE'
END
3. Place the calculated field on the Color shelf
4. Click the Color legend drop-down arrow, and select Edit Colors to choose your desired colors.

Additional Information

To view these steps in action, see the video below. 
Note: Video is silent.
Did this article resolve the issue?