Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!

Alteryx Designer Desktop Discussions

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

Remove one string column from another string column

tommyhally
Atom

See bottom for picture

 

I have product names (1st column) 

I also have a seperate flavour column

 

I want to remove the values in Flavour column from the text string in the Product column

 

So I would have the Product Description column without "SWEET MANDARIN AND GRAPEFRUIT" (in the first row for example)

 

This is tricky as you can see the flavour names have different numbers of words and lengths and they do not start at the same point in the text in each row.

 

Can someone help?

 

 

tommyhally_0-1669821842810.png

 

5 ANTWORTEN 5

Hi @tommyhally 

 

Try this formula

replace([Product], ' ' + [FLAVOUR], '')

Felipe_Ribeir0_1-1669822444992.png

 

 

IraWatt
17 - Castor
17 - Castor

Hey @tommyhally,

You could use the replace function to update the products column:

Replace([Product], [FLAVOUR], "")

IraWatt_0-1669822320779.png

 

 

JosephSerpis
17 - Castor
17 - Castor

Hi @ you can use a replace formula to tackle that challege.

DataNath
17 - Castor
17 - Castor

Hey @tommyhally, you should be able to use the following expression:

 

Replace([Product], ' '+[FLAVOUR], '')

 

The ' '+[FLAVOUR] means after removal, there won't be duplicate whitespace.

 

Examples here:

 

DataNath_0-1669822401847.pngDataNath_1-1669822407808.png

tommyhally
Atom

Thanks all for your guidance, this has solved my query - great support

Beschriftungen
Top-Lösungs-Autoren