Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Need to create new column based on text from another column

jjimenez
8 - Asteroid

I need help using the Formula tool OR another tool to create a new column based on text in a specified column coming out of a Join tool. 

In column KVI_NAME if text is "foreground" need to populate in new column "30%"

or

In column KVI_NAME if text is "background" need to populate in new column "40% - 50%"

 

**The new column that will need to be created will have subject "Index". 

 

 

jjimenez_0-1635891582336.png  

 

This is the error I keep receiving:

jjimenez_1-1635891909926.png

 

Any help will be greatly appreciated. 

 

 

4 REPLIES 4
Luke_C
17 - Castor

Hi @jjimenez 

 

Here is a formula you can use. You're on the right track but you'll want to use an if statement with a contains function to check for the keywords. You'll also want to make a new field instead of updating the existing KVI field.

 

if contains([KVI_NAME],'foreground')
then '30%'
elseif contains([KVI_NAME],'background')
then '40%'
else null()
endif

Luke_C_0-1635892708213.png

 

jjimenez
8 - Asteroid

Luck_C - Thank you for your help. 

Luke_C
17 - Castor

Happy to help @jjimenez! Don't forget to accept it as the solution so others can search for it easier. 

jjimenez
8 - Asteroid

Good to know. My first time posting a question. 

Thanks again.

Labels