Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Comparing Data from Two Columns

intergalacticali
5 - Atom

Hi...I'm trying to compare data from two columns in one dataset. In other words, I need to understand if the data in BA45=BC45 and then filter out the data that matches to only view the non-matching data. In Excel I created a new column and wrote the following formula:

 

=IF(BA45=BC45,"True","False")

 

I would then filter out all the "True" data.

 

I know there is a better way to do this! Big thanks in advance to any help!

4 REPLIES 4
CharlieS
17 - Castor
17 - Castor

Use a filter tool with the following formula where [Field1] and [Field2] are the columns of interest.

 

[Field1]==[Field2]

 

The filter tool will return the results where this condition is true to the "T" output and false to the "F" output. Note that the fields will need to be the same type to be compared (numeric to numeric, string to string, etc.). If necessary, you can force both fields to be strings using this formula:

 

tostring([Field1])==tostring([Field2])

intergalacticali
5 - Atom

Thank you! This worked perfectly! 

ofernan7
5 - Atom

 Is there a way to print the results separating the "true" from the "false" in two .csv file? 

tarunIMDG
7 - Meteor

@ofernan7 

Attach two output tools linking .csv files each next to true and false.

Labels