1 Reply Latest reply on Sep 13, 2016 10:50 PM by Ann Jackson

    Color cell in text table based on value in previous column?

    Steven Chang

      I have a text table of sales #'s where the columns are time periods and the rows are customers.


      I'd like to color a cell red in a customer row if the sales dropped from the previous column.  Is this possible?  I looked at the online help about the KPI but it didn't seem to fit what I wanted.


      Thanks for any help.

        • 1. Re: Color cell in text table based on value in previous column?
          Ann Jackson

          Hi Steve this is possible by starting with the "difference" quick table calculation.  Once you've created the table calculation you can use that within a calculated field to help set the colors.  If you want the cells to be completely filled (think conditional formatting in Excel) then likely you'll want to end up using the Square marks and having a continuous measure on color.


          Here's how I've set it up using Superstore:



          The quick table calculation for difference is shown on detail - here's how it looks in the calculation window:



          Last step that I did was to create a calculated field based off of this to set the colors to numbers (this gives me continuous values that I can use on color)



          And my color is set as follows:


          (btw: you could also use a custom diverging palette and make the 0 color white, then it would look like only red is visible)