4 Replies Latest reply on Feb 4, 2016 2:10 AM by jake long

    Shading- Particular Rows

    galaxy.tab

      Hi,

       

       

      In the attached workbook , I want to color rows 3, 6,8,10,11,13 only in this workbook sample.

       

       

      How can this be achieved.

       

      Thanks

        • 1. Re: Shading- Particular Rows
          jake long

          hi Galaxy,

           

          I created a calculated field

          color calculation:

           

          if [Index] = 3 then "color"

          ELSEIF [Index] = 6 then "color"

          ELSEIF [Index] = 8 then "color"

          ELSEIF [Index] = 10 then "color"

          ELSEIF [Index] = 11 then "color"

          ELSEIF [Index] = 13 then "color"

          END

           

          and I placed this into the color square in your marks card.

          I wouldn't recommend hard coding colouring based on index number, as when dealing with larger data sets it'll be hard to hardcode each row 1 by 1.

           

          Is there a condition in which you select which row to color?

          1 of 1 people found this helpful
          • 2. Re: Shading- Particular Rows
            galaxy.tab

            Hi Jake,

             

            I want to shade the entire row. Also the condition is not available for the measure.

             

            Can we write condition on the dimension ?

             

            Eg : IF product Name = '' then Orange

             

            Please advise

            • 3. Re: Shading- Particular Rows
              jake long

              Yes it is possible to write the condition based on the dimension as well, however, it is even more tedious as the string"" has to be exact. (case-sensitive)

              As for colouring the entire row It is possible but it requires a different method which is using cross tabs

              will something like this do?

              • 4. Re: Shading- Particular Rows
                jake long

                conditional formatting v4.twbx

                Follow this link it'll help a lot on learning how to cross tab,

                I've provided you of an example of how it'll look like in the tableau work book ver 9.2

                hope this helps and all the best!