I'm trying to essentially write an If...Then...Else statement using Arcade to change the text color in a Dashboard Indicator. I know what I need to do I just don't know the proper syntax for writing it and I'm having a problem finding a similar example.
var color = '' // using the var to change the color attribute
Decode($datapoint["capdep25"], //attempting to using the "capdep25" column
<=.25, {color = 'DF73FF'}, //if value is less than .25 make it pink
>.25 AND <=.50 , {color = '0070FF'}, //if value is between than make it blue
>.50 AND <=.75, {color = '38A800'}, //if value is between than make it green
>.75, {color = 'E60000'}, 0 //if value is greater than make it red
);I'm not sure if decode is the correct way to do this or there is a better way.
Thanks for the help in advance!