Output Issue
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Labels:
- Connectors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @hozikanch,
Try replacing
"ELSEIF [_CurrentField_]>95 <97.49"
with
ELSEIF [_CurrentField_]>95 AND [_CurrentField_] <97.49
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
IF [_CurrentField_] >= 97.5 THEN "STRONG"
ELSEIF [_CurrentField_] >95 AND [_CurrentField_] < 97.49 THEN "On Track"
ELSEIF [_CurrentField_] < 94.9 THEN "Growth"
ELSE " "
ENDIF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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. 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
