Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Best way to find exact words/phrases from multiple columns?

BigDataGeek
8 - Asteroid

We are looking to scan a large number of record and look in four of the columns of freehand input (text boxes).  If any of the words in those inputs match against a list of words/phrases, then indicate a match and where.  We'll build out some tableau off of these results.  I'm curious how others would approach this.  

 

We're looking for exact matches, so 'cannot' would not cause a flag if the keyword list contained 'not'.    Similarly, 'not a defect' would not flag if our keyword list was 'zero defect'.   I've attached a dummy workbook the loosely mirrors our data set up.  

 

Thanks for any help!

4 REPLIES 4
NicoleJohnson
ACE Emeritus
ACE Emeritus

Try this out! The Find & Replace tool should do the trick for determining IF there is a match between your lookup list and the actual data (I had to make up a list because the Excel example didn't come through). Then, I wasn't quite sure what you meant by "where" the match occurred, but using the assumption that you meant which character was the start of the word match, I included a Formula tool and a pair of formulas that should give you the character position of the start of the matching word. That was totally a guess, so if it wasn't quite what you were looking for, let me know! 🙂

word match.JPG

Cheers! 

NJ

danilang
19 - Altair
19 - Altair

Hi @BigDataGeek 

 

Extending @NicoleJohnson's excellent solution to handle multiple columns.

 

danilang_0-1635596047217.png

Basically transpose the text columns and then come up with a format for the match information since each row can now have matches from multiple columns.  I chose to have a pipe delimited list.

danilang_1-1635596785260.png

Dan

 

 

BigDataGeek
8 - Asteroid

@danilang @NicoleJohnson 

 

Thank you both.  Its on the right track, but the where part is different than the structure I'm trying to get to.  That said, the location function is a great way to know where in the freehand text it could be found.

In the sample excel that didn't populate right,  I had multiple columns of data of 'where' the match could come from.  I'm looking for a way to scan all four columns of data, pick up matches and output in a format I can continue on in Tableau with further reporting.  I think having each match on a separate row would be best.

 

IDWhereWord
1Text2zero defect
1Text1homogeneous
3Text3homogeneous


Here is how that missing excel was structured.

BigDataGeek_0-1635874180053.png

 

Thanks

BigDataGeek
8 - Asteroid

Hi Dan, 

 

This has worked well to search multiple columns, but I'm only picking up one word or 'Reason' right now.  One row may have multiple columns of data and each column may have multiple 'Reason's found.  How would you approach this to continue searching after a word is found and report all words found?

Labels