1

I have a text field called PerVax1 that has percentages.

enter image description here

I want to create an expression that labels the features when the field has a percentage greater than 30%. Here's some things I've tried so far:

var percentage = $feature.PerVax1;
var prcnt = "30%";
IIf(percentage >= "30%"){
return percentage}

//resulted in error:
Invalid expression.
Error on line 4.
Semicolon or new line expected.
var precentage;
percentage = IIf($feature.PerVax1 >= "30%")
return percentage;

//resulted in error:
Invalid expression.
Error on line 2.
Wrong number of arguments
1

I basically had it already.

var pct = $feature.PerVax1;
IIf(pct > "30%", $feature.PerVax1, "");

I forgot to mention I'm working in the label expression window.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.