Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here

Changing row values based on condition on columns

Highlighted
5 - Atom

I have 3+1 binary columns: [Apple],[Orange],[Banana] and [Don't like]. If a person likes Apple - 1, else-0 etc.. But if he doesn't like either of the 3-then Don't like will be 1.

 

What I want to achieve is when [Don't like] is 1, I would want to clear all values in [Apple], [Orange] and [Banana]. Please advice me your best options!

Highlighted
Alteryx Certified Partner

Hi @srinath76,

 

You can use a multi-field formula tool to do this. See: https://help.alteryx.com/2018.2/MultiFieldFormula.htm

 

Setup the tool like this:

-> Select the Fields Apple, Orange and Banana. 

-> Formula enter "If [Don't Like]=1 then NULL()  else [CurrentField] endif" 

 

Hope this helps,

Marco

Highlighted
13 - Pulsar

Possible to share sample data and result for better assistance. 

Highlighted
Alteryx Certified Partner

Yes, see the  attached sample workflow! 

 

My posted formula wasn't entirely correct, it should be: if Dislikes=1 then null() else [_CurrentField_] endif. 

 

Cheers,

Marco 

Highlighted
5 - Atom

 

Building on @Marco who helped me solve my issue.

 

I had a user who was incorrectly categorized as internal - I wanted to change her User Type to external, and leave all other users as-is. 

 

Using the Multi-Field Formula tool allowed me to accomplish this.  Hope this helps if you come across this. 

multi-tool.png

Labels