2 Replies Latest reply on Aug 28, 2017 3:45 PM by Jennifer VonHagel

    Color filtering by set of values

    Michael Ortiz

      I am trying to create a map with eleven countries listed and have them show in a stop light metric an avg value. However, some countries have different value ranges. For example Brazil  has a requirement of 48 hours and its average is 88 (well in the red), while India has a requirement of 96 and its average is 70. Is there any way to assign each country its own range of values for color filtering?

        • 1. Re: Color filtering by set of values
          Sarah Battersby

          Hi Michael,


          It sounds like you could use a calculation to determine the 'color' for each country.   The calculation could either return a normalized numeric value (encoding by the numeric data would give you different ranges = different colors), or a 'red', 'green', etc. text string based on the calculation. 

          But, a detailed answer really depends on what your data table looks like and how the values are calculated.  Can you share some of your data or the method for calculating the value that would be used for color filtering? It's difficult to figure out what the calculation would look like without knowing much about the data.



          Tableau Research

          • 2. Re: Color filtering by set of values
            Jennifer VonHagel

            Hi Michael, it would be easier to offer suggestions if you had sample data in an attached twbx, but one thought is to use a metric other than <avg value> to color the chart; something that shows distance between the average and the requirement. One possibility is to calculate the % above/below average:  (<avg value> / <requirement>)-1.

            Hope that helps,