1 Reply Latest reply on Mar 20, 2017 12:13 PM by Jamieson Christian

    Conditional Formatting for Crosstab-attempted multiple solutions

    jason.sanford

      Hello community-

      I have sales data for the last several years and I would like to compare each dealers sales year to year with each other rather than comparing all (sum all sales on color currently).  My first attempt:

       

      Capture.JPG

       

      I would like my end results to display this:

       

      Sales person A:

       

      2014        2015      2016

      $500        $1000     $700

      (green)    (green)    (yellow or red)

       

      I'd prefer to show yellow for a decline and red for zero if possible, but do not want to over complicate what I'm already struggling with.  I have tried this custom calculation with limited success,

       

      IF SUM([1314  $])>0 THEN "100"

      ELSEIF SUM([1314  $]) <=0 THEN "1"

      ELSEIF sum([1415  $])< sum([1314 C&B $]) THEN "1"

      ELSEIF sum([1415  $])> sum([1314 C&B $]) THEN "100"

      ELSEIF sum([1516  $])< sum([1415 C&B $]) THEN "1"

      ELSEIF sum([1516  $])> sum([1415 C&B $]) THEN "100"

      ELSEIF sum([1617  $])< SUM([1516 C&B $]) THEN "1"

      ELSEIF sum([1617  $])> SUM([1516 C&B $]) THEN "100"

      END

       

      I dropped this on the color marks card hoping to create a color scale based on the 1,100.  Using this calculation my results looked like this:

       

      Capture2.JPG

       

       

      I have tried this method (placeholder) with no success, it gives me the same results as my custom calculation (compares down column instead of across)

      Conditionally Format the Color of Individual Columns in a Crosstab View | Tableau Software

       

      I'd greatly appreciate any ideas, I'm the only Tableau person at my company and do not have anyone to bounce ideas off of.

       

      Thanks!

      Jason