5 Replies Latest reply on Apr 24, 2018 1:58 PM by Don Wise

    Conditional Label Shading

    Joe Milo

      Hi- I have a worksheet that I want to apply conditional label shading to. The labels them selves will not change, but the shading has to. The conditional label shading is based on "new","open", or "closed".  I've pasted below what the labels look like, and the gray shade means that I'm showing closed. If I filter on new or open, I want the shading to be a different color. Is there a way to do this? Appreciate any help. Thx!

       

        • 1. Re: Conditional Label Shading
          Don Wise

          Hi Joe,

          You may have noticed that many questions like this go unanswered as there's not enough information (either data or workbook example) to work from.  It would be helpful if you could post anonymized data or workbook if possible in order to understand the structure and get to possible solutions for you.  If that's not possible, you could try this example: Conditional Mark Labels

           

          Or, try a search on this category which will yield over 140 ideas: Search | Tableau Software

           

          Hope it helps with your effort! Thx, Don

          • 2. Re: Conditional Label Shading
            Joe Milo

            Hi Don- OK, I've attached a small example in the attached Excel of what I'm trying to do. Just a basic list of items where the user is able to filter on the Status - Open/Closed/New, and have the relevant items show up in the list. But depending on which status is chosen, the labels/headers across the top need to be shaded in the color associated with each status.

             

            I've created the workbook already with all the functionality needed except for the color shading.

             

            Let me know if this is enough info, or if more is needed. Appreciate any help!

             

            Thanks,

            Joe

            • 3. Re: Conditional Label Shading
              Don Wise

              Hi Joe,

              Okay, I've attached a new workbook for you.  It is in version 10.5.  If you don't have that version, let me know and I'll reattach for you (down to 10.2). I took your MS-Excel worksheet and dummied some data into it (no I'm not a runner ).  I did two methods so there are two different worksheets (1) Very simple (2) Complicated. I'm assuming because of the MS-Excel example that all of your data layout is Dimension (table) based and not measures.  If either solution works for you, please mark this post (not email) as correct so that others can find and use in the future.

               

              Simple method is just creating a calc and then bringing it onto color, clicking the color icon on the Marks Card and setting the colors to the appropriate values:

              Screen Shot 2018-04-23 at 4.43.50 PM.png

               

              This method, is much more complicated to do and the methodology can be found here: Conditionally Formatting Cell Background Color | Tableau Software

              Screen Shot 2018-04-23 at 4.44.08 PM.png

               

              Hope it helps!  Thx, Don

              • 4. Re: Conditional Label Shading
                Joe Milo

                Hi Don- thanks for the workbooks/screenshots - I probably should clarify further though. I mean that I need the top row labels colored, NOT the headers. So this part:

                 

                 

                Gray right now, but if the user picks another status, this is the part that I want to change the background color, with the label text not changing. The dashboard will basically be all a listing, with all dimensions as you mentioned, and I've got the shading of the actual data how I want it, but I need the top row labels to change background color.

                 

                Thanks,

                Joe

                • 5. Re: Conditional Label Shading
                  Don Wise

                  Hi Joe,

                   

                  Unfortunately, in all of my research on the subject (and there have been a number of more expert people than myself that have traveled down this road before) it doesn't currently appear to be possible. Where, the Dimension Label Header (not data pane labels) needs to be conditionally changed to a new color fill depending on Status field.

                   

                  It is however, an idea that has been voted up for possible development by the Tableau folks, but so far I haven't seen a workaround for your particular requirement.  

                   

                  It's also still possible that someone else may see this thread and jump on with a new idea, so hang in there!

                   

                  Apologies, Don