Alteryx Designer Desktop Discussions

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

Compare two columns with string values with delimiter

gelvira
7 - Meteor

Hello, 

 

I need to compare two columns with string values. I can do the comparison after parsing it but it is a long process. 

My Data is in Title 1 & Title 2. If they values are same irrespective of its position then I want it to display 'False', else 'True', If one column has additional values in that case I want 'True' as well, since it's not an exact match.

I replace the Title 1 '|' with ',' 

 

Is there any easy way to do it? Can fuzzy match work in this case? 

 

Title 1Title 2Result
null nullFalse
NH|ABAB,NHFalse
AB|CD|EFAB,CDTrue
AB|CDAB,CDFalse
nullABTrue
XYZA|DEO|LOMLOMTrue
DEODEO,LOM True
XYZA|DEO|LOMDEO,LOM,XYZAFalse

 

I would appreciate any help in this regard! 

4 REPLIES 4
DataNath
17 - Castor

How does this look @gelvira? One way of doing it:

 

DataNath_1-1656429843479.png

 

 

Luke_C
17 - Castor

Hi @gelvira 

 

Here's how I'd approach this:

 

  1. Add record ID and standardize delimiter
  2. Transpose data and split to rows
  3. Sort (this gets all the values in the same order to compare)
  4. Cross tab back and do the check

 

Luke_C_1-1656429880666.png

 

 

 

gelvira
7 - Meteor

Thanks!!!

This works. It's way straight forward than what I was doing. 

gelvira
7 - Meteor

Thank you!!! This is way simpler approach than what I was doing.

 

Labels