Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Parse Error at char(22): Invalid type in operator

dchin
7 - Meteor

I'm trying to create a simple formula if the "Amount" is greater than zero then mark it as "Yes" if not then "No" but I keep getting the "Parse Error at char (22): Invalid type in operator". 

 

The value under "Amount" is vstring.  I tried changing it into an Int 32 but then I run into a different error with the IF statement.  Attached is a sample data. 

 

Thanks in advance!

 

 

3 REPLIES 3
DataNath
17 - Castor
17 - Castor

Hey @dchin, do you need that level of precision in the values? If not, I'd set this to a Double data type. If so then perhaps try a FixedDecimal with varying levels of precision - 19.11 works for the sample data you've provided.

dchin
7 - Meteor

 I changed the data type to double and it worked without any issue.  Thank you for all your help!

DataNath
17 - Castor
17 - Castor

Glad to hear that @dchin! Realised I hadn’t explained the original issue, sorry! You were trying to apply a numeric operator (greater than, >) to a string value I.e. text.

Labels