If [_CurrentField_] >=97.5 THEN "STRONG" ELSEIF [_CurrentField_]>95 <97.49 THEN "On Track" ELSEIF [_CurrentField_] <94.9 THEN "Growth" ELSE " " ENDIF
Dont know where the issue is but its not giving me a accurate output
Solved! Go to Solution.
Hey @hozikanch,
Try replacing
"ELSEIF [_CurrentField_]>95 <97.49"
with
ELSEIF [_CurrentField_]>95 AND [_CurrentField_] <97.49
IF [_CurrentField_] >= 97.5 THEN "STRONG"
ELSEIF [_CurrentField_] >95 AND [_CurrentField_] < 97.49 THEN "On Track"
ELSEIF [_CurrentField_] < 94.9 THEN "Growth"
ELSE " "
ENDIF
Hi @hozikanch ,
The concern in your condition is at ELSEIF [_CurrentField_]>95 <97.49.
You had to write ELSEIF [_CurrentField_]>95 AND [_CurrentField_] <97.49 THEN "On track" ... Also, make sure that the selected fields are of numeric type so that the comparison is made without error with floating point numbers.
For the rest, it's OK. 🙂
@hozikanch , you need to add operator AND or OR when using 2 conditions in a single statement so in this case alteryx is unable to understand the below condition:
[_CurrentField_]>95 <97.49 THEN "On Track"
Instead of using this you should add AND and replace it by
[_CurrentField_]>95 AND [_CurrentField_]<97.49 THEN "On Track"
And also make sure the data type of the fields need to be numeric when comparing with numbers, otherwise Alteryx might return errors or return output by comparing the ASCII values of the data.