2 Replies Latest reply on Mar 10, 2012 8:07 AM by Zach Leber

    using categorical colors without adding a dimension

    Zach Leber

      I would like to use categorical colors (e.g. blue/orange) to color a bar chart based on whether the bars are positive or negative.  But I seem to be limited to using range colors when using a measure on the color shelf and with range colors you can't select orange and blue (at least I can't get anything close to orange) perhaps by Tableau design to distinguish continuous colors from discrete colors.  So following some advice in this thread I created a calculated field that returns two different strings instead of two different numbers, but when I use that it adds a dimension to my data which messes up what I'm trying to show.  I'd be happy just to get blue and orange bars using any method.  I've attached a packaged workbook.

      range_colors.pngcategorical_colors.png

        • 1. Re: using categorical colors without adding a dimension
          Shawn Wallwork

          Morning Zach, you've hit on one of the features that is greatly improved in 7.0! In 6.1 you're dealing with this:

          Zach-3.PNG

          And there's not really anyway to get a nice clean orange. In 7.0 when you click the start box at the end of the color range you get this:

           

          Zach-2.PNG

          Which results in this:

          Zach.PNG

          Which of course is what you're looking for. Unfortunately that means upgrading to 7.0 which probably isn't an option for you since you haven't done it already. I've studied your workbook and can't figure out why the color string is throwing off the values in your chart. I can't even see a pattern to it and I can't get at the Measure Value shelf, so I really don't know what's going on here. Hopefully someone else will have an answer for you. Sorry dude.

           

          --Shawn

          1 of 1 people found this helpful
          • 2. Re: using categorical colors without adding a dimension
            Zach Leber

            Thanks Shawn, we're about to go to 7, the color selection looks much improved. 

             

            I just figured out that my calculated dimension needed to aggregate the daily records using SUM so as to not partition the data.  So I changed from IIF([Minutes_FH-GP]>0, "FH","GP") to IIF(SUM([Minutes_FH-GP])>0, "FH","GP") to do the calculation per day rather than per record.  Now it works.  Updated screenshot and workbook attached.

             

            aggregated_colors.png