4 Replies Latest reply on Jun 26, 2018 12:53 AM by Benedict Sebastian

# How to conditional format a choropleth map

Hi,

I have choropleth map that needs to condtional formatted based on set criteria. My range at the minutes is between 0 to 45.9 . So I deally want 0 to 14 as Green, 15 to 34 as amber and anything greater as Red. I have played with the stepped colors but could not get it work as I wanted.

• ###### 1. Re: How to conditional format a choropleth map

Hi Benedict.

You cannot put ranges for a continuous field for colour, so what you need to do is create a discrete calculated field and apply it to colours:

Thanks,

Mavis

• ###### 2. Re: How to conditional format a choropleth map

Thanks for the response ...I created a calculated field as below . But these are decimal numbers. I was creating the percentage difference from first year as a table caclulation on this dimension to get the color scheme. So how to get around that ? also I have a page filter on year  that changes these figures across years.   Sorry i am relatively new to Tableau

if SUM([SumOfTotal Activity]) < 14

then 'Below 15%'

elseif SUM([SumOfTotal Activity]) >  15 and SUM([SumOfTotal Activity]) < 34

then 'Between 15 and 34 %'

ELSEIF sum([SumOfTotal Activity]) > 35

then 'Greater than 35%'

END

• ###### 3. Re: How to conditional format a choropleth map

Hi Benedict,

You need to update your calculation so that it is the % decimal value rather than the whole number. So 10% = 0.1, you need the calculation to be more like:

if SUM([SumOfTotal Activity]) < 0.14

then 'Below 15%'

elseif SUM([SumOfTotal Activity]) >  0.15 and SUM([SumOfTotal Activity]) < 0.34

then 'Between 15 and 34 %'

ELSEIF sum([SumOfTotal Activity]) > 0.35

then 'Greater than 35%'

END

Thanks,

Mavis

• ###### 4. Re: How to conditional format a choropleth map

Thanks Mavis Liu !!