KNOWLEDGE BASE

Refreshing View or Re-Opening Workbook Loses Assigned Color Palette


Published: 19 Sep 2016
Last Modified Date: 06 Mar 2017

Issue

If the field on the Color Shelf is defined by an IF/THEN calculation that is data type String (Abc), and the color palette is edited to non-default, refreshing the view or reopening the workbook may revert the color palette back to default.

Environment

Tableau Desktop 9.3 - 10.1

Resolution

Use the following workaround:

For the Calculated Field used to encode color for the view, replace the original formula that returned STRING values with a similar formula that returns INTEGER results instead, as shown in the example below:

Original Formula:
IF SUM([Measure]) = WINDOW_MAX(SUM([Measure])) THEN "GREEN" 
ELSEIF SUM([Measure]) = WINDOW_MIN(SUM([Measure])) THEN "RED"
ELSE "BLUE"
END
Revised Formula:
IF SUM([Measure]) = WINDOW_MAX(SUM([Measure])) THEN 1 
ELSEIF SUM([Measure]) = WINDOW_MIN(SUM([Measure])) THEN 2 
ELSE 3 
END

Note: Using this workaround will cause the labels on the Tableau-created color legend card to be numbers rather than the desired strings. To create a revised color legend with the desired text:
  • A dashboard must be used, allowing a text box to be placed as a floating object on top of the legend text.
  • Alternately, a separate worksheet can be built to create a custom (manual) legend.

Cause

This is a known issue under investigation.
Did this article resolve the issue?