Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Alteryx is here to help you solve your biggest data challenges. Read about the new Virtual Solution Center here.
SOLVED

Multiple IF expression - Invalid type in operator == error

Highlighted
7 - Meteor

I'm new to Alteryx and am trying to perform what should be a relatively simple task.

 

I have two existing columns, the rows in these columns contain either a 0 or a 1. The 0 denotes a no whilst the 1 denotes a yes.

 

I need a working formula that creates a new column based off of the following:

 

If the value in column A is 0 then mark as 0, if the value is 1 look at Column B, if Column B is a 0 then mark as 1, if Column B is a 1 mark as 0.

 

The formula I am trying to use is:

 

IF [Renewal_Invited_Count] =0 THEN "0" ELSEIF [Renewal_Lapsed_Count] =0 THEN "1" ELSE "0" ENDIF

 

Unfortunately this formula is bringing up the error listed in the title, the exact error message when run is: Error: Formula (105): Parse Error at char(0): Invalid type in operator ==. (Expression #5)

 

I'm sure that I have a simple syntax error, but for life of me cannot get it to work no matter which way I write it.

Highlighted
10 - Fireball

Your formula looks good, I tried it on a sample dataset and it worked. You're returning a string field and I expect your source fields (Renewal_Invited_Count and Renewal_Lapsed_Count) are Byte or Int fields. Worth checking the field types and letting the forum know whether this could be an issue as your formula worked for me. 

7 - Meteor

Thanks for looking everyone, have realised my newbie mistake. The formula was just fine, except for the fact that my data is a vstring and as such I needed to place quotation marks around the 0's.

Labels