Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

IF AND Not Equal Statement

grsomer
8 - Asteroid

Hi!

I am using syntax that looks like this: if [Is Buy/Sell] != "sell" && [TRADE_KEYWORD.BO_ProductType] = "FEES_BBL_ACCR" then 2800 else 2300 endif , but am receiving the error "Invalid type in operator ==". I am sure I am doing something very simple and obvious wrong, but I am not sure what exactly it is!

2 REPLIES 2
CharlieS
17 - Castor
17 - Castor

It might have to do with your result values and the field your expressions is assigned to. The default Formula field is a string type, if your results are 2800 and 2300 those are numeric values.

 

Try changing your field type to a numeric field, or adding quotes around 2800 and 2300 to make them string values.

Kenda
16 - Nebula
16 - Nebula

@grsomer 

 

Make sure both of the fields you're checking in your if statement are string fields and that the field you're creating with your output is a numeric field.

Labels
Top Solution Authors