Alteryx Designer Desktop Discussions

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

Comparing Records between two columns for similarity

vvissamsetty
8 - Asteroid

I got two columns which are mixed with "True" and "False". I'm trying to create a check function where if Column A = "True" and Column B = "True" then the output should be "True" if not it should say "Error" and the same applies to "False". Its basically if a cell in Column A matches to the same cell in Column B then everything is fine else that's an error. It would be great if anyone can suggest how can I go with this.

4 REPLIES 4
danilang
19 - Altair
19 - Altair

hi @vvissamsetty 

 

Try this in a formula tool

 

if [ColumnA] = [ColumnB] then
	[ColumnA]
else 
	"Error"
endif

 

Dan 

vvissamsetty
8 - Asteroid

Hi Dan,

I tried the same thing and it's giving me this error "Invalid type in operator ==".

danilang
19 - Altair
19 - Altair

@vvissamsetty 

 

This generally happens when you're trying to use operators that aren't compatible with the underlying data types.  Check the data type on the 2 columns you're comparing to ensure that they're the same.  Can you post screen shots of your metadata and the formula tool that your using?

 

Dan

vvissamsetty
8 - Asteroid

It was the data type. Thanks Dan.

Labels