3 Replies Latest reply on Jun 28, 2013 12:18 PM by Robert Tufts

    Conditional Formatting Using Different Calculations

    Phillip Marquart

      Pretty simple question (I hope), but I cannot figure it out nor find another discussion on the topic.

      Basically I have a summary table, and I want to create a color coding system, but the calculation would be different for each data point.

       

      I know how to do it if I wanted the same measurement to be used for all of the data points, but I don't know how to do it using a different calculation for each.


      So for example, I want to get the Inventory total to shade to red is below 400 and shade green if above 500. I want opens to do something similar, but using different baselines.

       

      BI Rollup.jpg

       

      Possible?

        • 1. Re: Conditional Formatting Using Different Calculations
          Robert Tufts

          If you are building a dashboard, you can create individual sheets for each measure, color each measure accordingly on their individual sheet, and then combine them into a row on your dashboard.

           

          The other solution I can think of depends on the structure of your table.  If your underlying table looks like the example above, then this won't work.  Otherwise, make sure your measures are all in one single column, and their corresponding "labels" are in a second column.  (Tableau likes data tables that are longer rather than wider -- or so I've been told.)  That way you can create a series of calculated fields based off of the column with the measure labels.

          1 of 1 people found this helpful
          • 2. Re: Conditional Formatting Using Different Calculations
            Phillip Marquart

            I've thought about building each 'box' as its own worksheet, but I figure there has to be a way to get a calculated field to work for just one field (and not the others). Right now, if I write a calc field to turn green if inventory is within a range, but then it turns all of the fields green. Do you know how to create a calc field to ONLY turn one? Or to exclude the other data points from the field?

             

            Thanks for taking the time to help think through this.

            • 3. Re: Conditional Formatting Using Different Calculations
              Robert Tufts

              http://public.tableausoftware.com/static/images/Sa/SampleforTableColoring/Sheet1/1.png

               

              This solution depends on how your data is structured.  Take a look at the underlying data to see how it is organized.  But it gets the result you want where each measure is independently colored.