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

How to compare two columns with each row of two columns.

Thulasi
8 - Asteroid
C1C2new C1
A10
BFB
CHC
DAD
180

From the above table. compare the C1 and C2 , if they are equal then particular compared value in C1 must be made 0. for example  In C1 I have A and in C2 I have A then  C1 contains A  made to 0.Is it doable in alteryx.

5 REPLIES 5
andre347
10 - Fireball

You would use a logic statement here. IF [C1] = [C2] THEN 0 ELSE [C1] ENDIF

 

Does this work for you? Maybe you can mockup a workflow to illustrate the issue

 

Andre

pcatterson
11 - Bolide

Yes, this can be done with a formula tool.  Depending on whether you want to overwrite your 'C1' column, it can look two ways.  See attached for more details.

Thulasi
8 - Asteroid

Thanks for the reply. But my issue is to compare every row of C1 with Every row of C2.From the table am comparing the all the values of C1 with all the values of C2.Then if C1 value exists in C2 then that same value which is equal should be 0 in C1. 

pcatterson
11 - Bolide

It can be done but its much trickier.  Here is a way to approach it which is somewhat limited in that it will be very time consuming with a large data set, but will get the job done.  See attached for my attempt.

Thulasi
8 - Asteroid

Thank you very much!!!!!

Labels