Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Output Issue

hozikanch
7 - Meteor

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 REPLIES 4
FrederikE
13 - Pulsar

Hey @hozikanch,

 

Try replacing

 

"ELSEIF [_CurrentField_]>95 <97.49"

 

with 

 

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

binuacs
20 - Arcturus

@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
13 - Pulsar

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
17 - Castor

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