Alteryx Designer Desktop Discussions

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

Multifunction If

atarahoward
6 - Meteoroid

If I want to label a range 0-60 "410A-L" and 61+ "410A-L" what is the proper IF function? The formula below has a parse error "Invalid type in operator >=", what am I missing here?

 

if [LS Tonnage] <=60 then "410A-M" elseif [LS Tonnage] >=61 then "410A-L" endif

3 REPLIES 3
binuacs
20 - Arcturus

@atarahoward The else part is missing in your expression

binuacs_0-1685042872648.png

 

atarahoward
6 - Meteoroid

atarahoward_0-1685043369856.png

This is the error I'm receiving now, could it be my prior substring? 

binuacs
20 - Arcturus

@atarahoward seems to be the field LS Tonnage is string type, try the below formula

 

if [LS Tonnage] <= '60' then "410A-M"
elseif [LS Tonnage] >= '61' then "410A-L"
Else Null()
endIf

Labels