Announcement | We'll be doing maintenance between 2-3 hours, which may impact your experience. Thanks for your patience as we work on improving the community!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Output Issue

hozikanch
メテオール

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

4件の返信4
FrederikE
パルサー

Hey @hozikanch,

 

Try replacing

 

"ELSEIF [_CurrentField_]>95 <97.49"

 

with 

 

ELSEIF [_CurrentField_]>95  AND [_CurrentField_] <97.49

binu_acs
ポラリス

@hozikanch 

IF [_CurrentField_] >= 97.5 THEN "STRONG" 
ELSEIF [_CurrentField_] >95  AND [_CurrentField_] < 97.49 THEN "On Track" 
ELSEIF [_CurrentField_] < 94.9 THEN "Growth" 
ELSE " " 
ENDIF

 

 

Emmanuel_G
パルサー

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. 🙂

grazitti_sapna
キャスター

@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.

Sapna Gupta
ラベル
トップのソリューション投稿者