We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Update field from values in multiple columns

jenettd
7 - Meteor

Hello good people of the Alteryx Community! I need your help.

 

I'm trying write a formula to look at values in multiple columns, find the word 'Fail' and if any of the columns do include 'Fail' I want a separate column to update with "No". If there are no Fails, I want that same column to update with "Yes".

 

Here's my example. I want the formula to look at columns A, B, C and D, find any values that equal "Fail" and update column QA with "No" if it finds at least one fail across those columns. If it doesn't find any fails, i.e. if the columns have all Pass and no fails, the QA column should update with "Yes".

QAABCD
YesPass - No PDE Present,Pass - Present in ADMFQA Fail - Blank or NullPass - Present in ADMFBL Fail - BL repeats dif BDE,Pass - Same BDE, Same BL
YesPass - No PDE Present,Pass - Present in ADMFQA Fail - Blank or NullPass - Present in ADMFBL Fail - BL repeats dif BDE,Pass - Same BDE, Same BL
YesPass - No PDE Present,UCEN Fail - Not in ADMFQA Fail - Blank or NullPass - Present in ADMFBL Fail - BL repeats dif BDE,Pass - Same BDE, Same BL

I used the Formula tool but it's not working from me because I'm pretty sure my formula isn't correct. Here is what I have. I did this for each column I want the formula to look in but it keeps returning "Yes" when clearly there are "Fails"

 

if Contains([A], "Fail")
then "No"
else "Yes"
endif

 

Thank you in advance for your assistance!

 

 

 

 

2 REPLIES 2
griffinwelsh
12 - Quasar

@jenettd you need to reference all columns in your formula. Try this:

if contains([A]+[B]+[C]+[D],"Fail") then "No" else "Yes" endif

jenettd
7 - Meteor

Yes!!!! Thank you that worked! Enjoy your day!

Labels
Top Solution Authors