Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

exclude whole word in formula

Barrypol1976
6 - Meteoroid

Goodmorning,

 

i have a question. I try to find some products in a database which contain whole grain but not flower. All fine in this simple formula. But in some case products also contain sunflower oil. These articles should come out as yes. Is it possible to exclude sunflower and how. By a replace command? Is it possible in this formula or do i need to build a small flow with a find and replace tool?  thanks for the help. best regards Barry

 

if Contains([Ingredients], 'Whole grain') and !Contains([Ingredients], 'flower') then "YES"
Else "NO"
ENDIF

2 REPLIES 2
mhey01
7 - Meteor

Hey @Barrypol1976 

 

I've quickly thrown a workflow together for you. Is this the kind of solution you're looking for?

 

removeflower.png

I am using Regex to parse where the text field ends with 'flower', and then use the filter tool to only show records where 'flower' in this format has not been parsed. This retains 'sunflower oil'.

 

flowerworkflow.png

Barrypol1976
6 - Meteoroid

Thanks for your reply, your flow helped a lot and with some adjustments it works for me! Thanks again!

Labels
Top Solution Authors