Alteryx Designer Desktop Discussions

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

Data Comparison

bsanthoshpk
8 - Asteroid

Hi All,

 

I want to compare column vs column(with in same table) and report any data has been modified or not, 

 

Requirement:

Example I have list of column separately

 

1)Take the column list one by one for eg Column1 

2)look for that column in the table

3)now take 'Right_Column1'

4)compare data both, if same, no action required, if different, write' yes' in modification column

5)Now take the next  column in  'list of columns', here we go with coloumn2

6)look for the column in table

7)now take 'Right_column2'

8)compare data of both, if same, no action required, if different, write' yes' in modification column

9)do this until list of columns are completed,

 

Column1Column2Column3Column4Right_Column1Right_Column2Right_Column3Right_Column4Column5Column6Modification
Apple26Northwestc12Apple26Northwestc12eeewNo
Orange45Southeastd34grape45Southeastd34weutYes

 

List of Coolum's
Column1
Column2
Column3
Column4

 

 

 

 

8 REPLIES 8
ShankerV
17 - Castor

Hi @bsanthoshpk 

 

I believe you ask is very simple. 

But reading a big passage is something which I get confused and seems complex.

 

Can you share the Input and the desired output will be easy to understand and work on the solution.

 

Many thanks

Shanker V

Christina_H
14 - Magnetar

There's no need to compare column by column, you can transpose the data and compare them all at once.

Christina_H_1-1671106718794.png

 

bsanthoshpk
8 - Asteroid

Hi @Christina_H 

 

Awesome, Thanks a lot :)

bsanthoshpk
8 - Asteroid

Hi @ShankerV 

 

Thanks for your reply. got solution :)

bsanthoshpk
8 - Asteroid

Hi @Christina_H 

 

Thanks for sharing your knowledge. But I need one more small help.
I modified your workflow to add another column as circled.
That column says which columns has different data.
But now I have a trouble.
I also want to replace data in such varying columns.
Eg: record id 2, column1=orange ; right_column1=grape.
Now I want to see output as orange in right_column1 also.
Bcoz my end agenda is to find
- affected column names

- also replace the affected columns with new data. Column1(new data), right_column1(old data). So want to replace grape with orange in this case. Same way for every affected column in every record.

Can you pls help me on the same.

 

bsanthoshpk_0-1671346824497.png

 

ShankerV
17 - Castor

Hi @bsanthoshpk 

 

Please find the below expected solution.

ShankerV_0-1671356706352.png

 

As per your expectation, the Right columns are replaced with the values of the Left column if there is a difference.

Also the columns which are amended are captured.

 

ShankerV_1-1671356815027.png

 

Note: The workflow used to achieve the solution is attached which can be downloaded to see how the solution works.

 

If you believe your problem has been resolved. Please mark helpful answers as a solution so that future users with the same problem can find them more easily!!!!

 

Many thanks

Shanker V

 

 

bsanthoshpk
8 - Asteroid

Hi @ShankerV 

 

Thank you so much sharing your knowledge, great work..

 

Also, i tried this way, i got expected result..

IMG-20221218-WA0048.jpg

ShankerV
17 - Castor

Hi @bsanthoshpk 

 

Glad my solution helped!!! Happy to support anytime!!!

 

Please mark helpful answers as a solution so that future users with the same problem can find them more easily!!!!

 

Many thanks

Shanker V

Labels