Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Comparing Input in two columns

Chirag_Gandhi07
8 - Asteroid

So I am trying to check whether certain data in one column is equal to the data from another column. So if one row is 100.00 and that is the same in the other column, I want to know about it. If they match, they should output a 0, and if not, a 1. I am getting an invalid type in operator ==. message. What I did is:

 

IF [Contract Payment Amount] == [Sum of BASE PAYMENT ] THEN 1 ELSE 0 ENDIF

 

The two column names are Contract Payment Amount and Sum of BASE PAY

3 REPLIES 3
NicoleJohnson
ACE Emeritus
ACE Emeritus

If you're getting an error that says Invalid type in Operator, that generally indicates that one of your fields is not the same data type (so either Contract Payment Amount or Sum of Base Payment is a string data type while the other is numeric). If you put a Select tool before your formula tool, you should be able to check the data types and make sure they are both numeric, then your formula will work as written!

 

NJ

Chirag_Gandhi07
8 - Asteroid

Yes it worked after I changed the data types to the same. Thank you so much!

simasarry
5 - Atom

Does it work if the columns to compare are in two different files ? like the vlookup function in excel?

 

Labels