Last Modified Date: 20 Jul 2023
Environment
Tableau DesktopResolution
Option 1
Create 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 2
In 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.Cause
This 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 Information
In the example formula above, the conditionSUM([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.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