Alteryx Designer Desktop Discussions

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

Find string value from col1 and remove that value from col2

yeruvab
7 - Meteor

I need remove the entire value starting with matched value in other column, let me know for further questions. TIA

 

Col1

Col2

EXPECTED

XYNTHA, XPOVIO

XYNTHA SOLOFUSE

XPOVIO

FLUTHOX DR, NATESTO, VOGELXO

FLUTHOX HCL

NATESTO,VOGELXO

BUPROPION HCL, BUPROPION HCL SR

BUPROPION XL

 

SULFACETA SODIUM

SODIUMSULFACETA

 

4 REPLIES 4
Garrett_Stoker
7 - Meteor

I probably made this a little harder than it needed to be, but assuming you have a finite list of connector/trailing words, you could make something like this. 

Yoshiro_Fujimori
15 - Aurora

Hi @yeruvab ,

 

The 4th row makes the issue harder as it is not clear which "word" should be checked.

So I relaxed the problem to deal with only the words separated by space, instead of any possible length of the string in Col2.

I hope this helps.

 

Input

Col1Col2
XYNTHA, XPOVIOXYNTHA SOLOFUSE
FLUTHOX DR, NATESTO, VOGELXOFLUTHOX HCL
BUPROPION HCL, BUPROPION HCL SRBUPROPION XL
SULFACETA SODIUMSODIUM SULFACETA

 

Output

RecordIDCol1Col2Expected
1XYNTHA, XPOVIOXYNTHA SOLOFUSEXPOVIO
2FLUTHOX DR, NATESTO, VOGELXOFLUTHOX HCLNATESTO,VOGELXO
3BUPROPION HCL, BUPROPION HCL SRBUPROPION XL 
4SULFACETA SODIUMSODIUM SULFACETA 

 

Workflow

1280539_Workflow.png

terry10
12 - Quasar

@yeruvab 

 

You might want to look into Fuzzy Matching!

 

Tool Mastery | Fuzzy Matching 

 

yeruvab
7 - Meteor

Thank you for your answers, helped me understand how to solve such tricky scenarios.

Labels