4 Replies Latest reply on Oct 26, 2016 7:36 AM by paolo.raia

    Pre-set colour palette even if value does not exist

    paolo.raia

      Hi there,

       

      I have a provisional list of codes with colour values:-

       

      A1 = YELLOW

      A2 = BLUE

      A3 = GREE

      A4 = ORANGE

       

      At present, I only have A1 and A2 values in my dataset and I have set them to the corresponding colour (above).

       

      Rather than let Tableau auto-assign a colour when the other values drop-in, I wold like them pre-set as per table above.  I've looked at temporarily adding the other values to the dataset, assign a colour when they drop into Tableau and then deleting the data, but not sure if this will work going forward.

       

      Is there anyway of achieving this?

       

      Many thanks in advance.

        • 1. Re: Pre-set colour palette even if value does not exist
          Simon Runc

          hi Paolo,

           

          Not as far as I'm aware...the method you propose, of setting up some dummy data so all 4 values are visible, and then setting the pallet, is the one I use. It's worth doing this colour setting on the actual dimension/measure default setting

           

           

          When you then bring in your real data, Tableau *should* remember the correct colouring for all 4, even if only 2 are currently in the data. One time that this can fall down, is when you do a "Replace Datasource". However , if you click through (and allow to render) all dashboards/worksheets (btw you can do this quickly by changing view to thumbnails -> right click and select "Refresh all thumbnails") before replacing the data source it *should* remember the settings (it seems Tableau needs it in the cache to remember all the settings!)....this is just for "Replace Datasource", and simply updating/refreshing the data shouldn't cause any problems.

           

          Hope that helps.

          2 of 2 people found this helpful
          • 2. Re: Pre-set colour palette even if value does not exist
            Hope Stiles

            One way to do this is to use a continuous field and set the Pallete to 4 steps.  Attached is an image of how I do this.  The field on the color card is a calculated field that assigns a value (0-3) to the measure.  This way the colors are set and they all show in the legend even if they aren't all in the data.  There is probably a clearer way to explain that, but hopefully it helps.

            -Hope

            color pallette.GIF

            2 of 2 people found this helpful
            • 3. Re: Pre-set colour palette even if value does not exist
              paolo.raia

              Hi Simon,

               

              Many thanks for the feedback.  The DEFAULT PROPERTIES>SETTINGS is a good way to select the colour scheme.  And thanks for the thumbnails tip!

               

              Regards.

              • 4. Re: Pre-set colour palette even if value does not exist
                paolo.raia

                Hi Hope,

                 

                Many thanks for your reply.  The stepped solution is a good alternative and I can use this method in another vis I am working on.

                 

                Regards.