Last Modified Date: 30 Sep 2019
Option 1Create a calculation that generates explicit and fixed string values for color assignment.
- Navigate to Analysis > Create calculated field....
- Name the field as desired.
- Enter a formula similar to the following:
IF SUM([Dollars HUB])/SUM([Dollars SB eligible])*100>MAX([Target PCT]) THEN 'True' ELSE 'False' END
- Drag the newly created field to the Color card.
- Double-click the Color card and edit color assignments as preferred.
Option 2In some cases, this issue can be resolved by dragging the calculation to the Measures or Dimensions pane, thus saving the ad-hoc calculation. Once saved, the field can be edited as desired, e.g. naming the calculation.
CauseThis behavior is related to the True/False condition not being explicitly defined from within the calculation. As a result, these values are generated each time the workbook is opened, and then assigned a default color palette, because there are no static string references on which to base a custom color palette.
Additional InformationIn the example formula above, the condition
SUM([Dollars HUB])/SUM([Dollars SB eligible])*100>MAX([Target PCT])is recognized as a Boolean statement. As a result, Tableau Desktop automatically generates and applies True and False values when the calculation is dragged to Color.
Discuss this article...
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Training and Tutorials