5 Replies Latest reply on Oct 10, 2012 6:42 AM by Jonathan Drummey

    Setting/Saving Colors in Legend


      We have a calculated field where we set colors using the
      following IF statement where ‘Green Limit’ and ‘Red Limit’ are parameters.


      IIF([Field] > [Green Limit],


                IIF([Field] <
      [Red Limit],       


      We then set the colors associated with ‘Green’, ‘Red’, and ‘Amber’
      by editing the colors in the legends.
      The colors associated with each label change sometimes when we save,
      close, and re-open or when we save and publish.
      Is there a way to set the colors in a manner that they don’t change (ie:
      ‘Green’ doesn’t show as blue, etc) ?

        • 1. Re: Setting/Saving Colors in Legend
          Jonathan Drummey

          Can you be more specific about when the color palette changes? One place when color palettes will change is when the domain changes, is the [field] you are using an aggregate (measure) or a dimension?



          • 2. Re: Setting/Saving Colors in Legend



            The field we are using is an aggregate(measure). The color palette changes is the following situations:


            -Saving, closing, and re-opening same twb

            -Saving and publishing to same environment

            -Saving and publishing to new environment


            This occurs with both an embedded data source as well as a server data connection.

            • 3. Re: Setting/Saving Colors in Legend
              Jonathan Drummey

              Ok, I think I might have a solution, I should have remembered this as a possibility in the first place. Create two new calculated fields for the parameters that just return [Green Limit] and [Red Limit] respectively, then use those fields in place of the parameters in your color calculated field. There's a situation I've seen before where the palette for a parameter-based color field was reloaded every time Tableau reloaded the workbook, but when a calculated field was wrapped around the parameter and used instead then Tableau could hold onto those settings. I'm not sure that's what is going on for you, since I'm unable to duplicate the behavior. If it's still happening, could you post a workbook with some sample data?

              • 4. Re: Setting/Saving Colors in Legend

                Thank you very much for your suggestion.  We tried this option and unfortunately the colors in our legends still changed after we published.  Unfortunately we are unable to post any variation of our workbook due to security reasons.


                Any other suggestions would be greatly appreciated! Thank you!

                • 5. Re: Setting/Saving Colors in Legend
                  Jonathan Drummey

                  I'm sorry, I'm not able to help more at this point without being able to see the workbook or duplicate the behavior. I can offer a few suggestions:


                  - If you are ok with sharing the workbook with me privately, contact me at jonathan (dot) drummey (at) gmail (dot) com and we can set up a webex session.


                  - Alternatively/in addition, take the time to sanitize/randomize some sample data in a duplicate workbook and then you can share that. If dimension names would be revealing, then also change those in the duplicate.


                  - Contact Tableau Technical Support. FYI, they will likely want to see a workbook as well. They do have a capacity for securely uploading workbooks, if that doesn't work for you then you would need to create the sanitized workbook.