Last Modified Date: 03 Jan 2019
Environment
Tableau DesktopAnswer
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:
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.
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.
Discuss this article... Feedback Forum
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials