1 Reply Latest reply on Oct 9, 2018 1:58 PM by Sarah Battersby

    Displaying quintiles in a map and showing range for each quintile in legend

    astrid.knott

      I have a map with population at the county level and would like to display population in quintiles at the county. The legend should show the 5 categories and display the min and max for each (either dynamically, or as an edit of the titles in the legend).

       

      I can't get the population quintiles to break out into 5 categories (shows as a continuous variable).

      How does one change the legend to look something like this:

           1 - 3000-10,000

           2 - 10,000-35,000

           ...

       

      I feel like I'm approaching this from the wrong angle.

       

      Thank you.

        • 1. Re: Displaying quintiles in a map and showing range for each quintile in legend
          Sarah Battersby

          Unfortunately there isn't an easy way to generate a legend with the ranges broken out, unless you have the ranges as a dimension.  When I'm working with quantiles I tend to create a calculated field that separates each data value into the right group and assigns it the appropriate label. It's just a big if/else statement (e.g., if value < 10 then '0 to 10' elseif value < 23 then '10 to 23', etc.)

           

          I calculate my quantile breaks manually (or by looking at the breaks in another viz) and then use those values in my calculated field.

           

          There may be a way to determine the breaks on the fly as part of the calculated field, but I've always found it pretty quick to just figure out the breaks by hand

           

          -Sarah

          Tableau Research

          1 of 1 people found this helpful