3 Replies Latest reply on Dec 9, 2016 1:06 PM by Jonathan Drummey

    Coloring columns based on a condition


      Hi, I am not much familiar with conditional formatting. This snapshot is from my workbook.

      I want the columns to be colored based on the average scores received in the four assessments. If the average score exceeds 3 color the column green. If average score is less than 3 color the column red. Thus for our workbook strategic thinking, teamwork,listening should be red. Forward thinking,communications should be green and likewise. I have attached my workbook. Please help.

        • 1. Re: Coloring columns based on a condition
          Simon Runc

          hi Roushan,


          So there is no "dynamic" way we can do this in a drag (or two)...to my knowledge.


          If you just want the "marks" coloured, that's really easy...you can just drag measure names to the colour tile.


          To get the Axis to colour, I've set up reference lines (I've only done a couple of them)...


          I right click on an Axis, and select "Add Reference Line" and set it up as per the below image (I've boxed the key parts).



          If you also want to colour the Axis title and tick marks...you can do this here (right click on each axis and select format)



          So a bit manual, but hope that helps.

          1 of 1 people found this helpful
          • 2. Re: Coloring columns based on a condition
            Yuriy Fal

            Hi all,


            Plain ole whole-size Squares could do the trick.

            A lot of manual work, though.


            Please find the attached.




            1 of 1 people found this helpful
            • 3. Re: Coloring columns based on a condition
              Jonathan Drummey

              Here's a third option using Tableau's pivot feature:


              Screen Shot 2016-12-09 at 3.58.03 PM.png


              This looks like survey data which typically comes in a "wide" format where there's a column per question or survey dimension. Tableau is generally easier to work with in a "tall" format. I used Tableau's pivot feature to transform the data, then set up a dual axis chart where the first axis is the Pivot Field Values (the scores) plotted using circles and a second axis is a bar chart with a value of 1 and the Size made to fill up the entire cell, then WINDOW_AVG(SUM([Pivot Field Values])) is the measure on Color with Table (down) as the compute using and a customized diverging palette with 3 set as the center.




              PS: For working with survey data I heartily recommend reading Steve Wexler's work at http://www.datarevelations.com/ .


              PPS: Tableau 10.2 is in beta Coming Soon  and the final release is supposed to have a "Legends per Measure" feature that will let us set up this type of view without needing a pivot, though it would require configuring N legends where N is the number of questions/survey dimensions.

              3 of 3 people found this helpful