Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Trouble with color coding by expression on map

I'm trying to color code by expression on a map and it's not working ... I believe the calculation to be correct, can anyone help with this? I can send you additional information if needed. Thanks!

if (Sum([Shrink Dollars])/Sum(Dollars)>3,rgb(102,37,6),

if (Sum([Shrink Dollars])/Sum(Dollars)>2.5,rgb(153,52,4),

if (Sum([Shrink Dollars])/Sum(Dollars)>2,rgb(204,76,2),

if (Sum([Shrink Dollars])/Sum(Dollars)>1.5,rgb(236,112,20),

if (Sum([Shrink Dollars])/Sum(Dollars)>1,rgb(251,154,41),

if (Sum([Shrink Dollars])/Sum(Dollars)>.5,rgb(254,196,79),

if (Sum([Shrink Dollars])/Sum(Dollars)<.5,rgb(254,227,145))))))))

2 Replies
MK9885
Master II
Master II

can you upload sample app if possible?

rubenmarin

Hi Erin, you can try creating a table with the field used as map dimension and the expression:

Sum([Shrink Dollars])/Sum(Dollars)


And confirm the values returned are as expected, you can also try setting the color codes between simple quotes to confirm the color code value returned is also correct:

if (Sum([Shrink Dollars])/Sum(Dollars)>3,'rgb(102,37,6)',

....


If it seems ok in table maybe is something realted with map settings, a sample will be nice to confirm why is not working.