Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Formula Tool

Stacy
7 - Meteor

Hi, 

 

I tried to add a formula tool with expression below.

 

iif(length([GCLID])>50 and ([Score])>3,"Y","N")

 

What i trying to do is find field "Gclid" string length >50 and field "score" number >3 to mark with Y in the new output field and other with N in the new output field. But it doesn't work. Please help. Thank you!

 

Stacy

3 REPLIES 3
kevinbird15
9 - Comet

Hey Stacy,

 

What type are you making the new field?  For a "Y" and "N", it will have to be String or similar type.  If that isn't the problem, what is the error that you get when you put that into a formula?

 

Thanks, 

 

Kevin

MarqueeCrew
20 - Arcturus
20 - Arcturus

If there are trailing spaces on the text, you might want to use the TRIM() function. @kevinbird15 is right in that your new variable needs to be a string to accommodate the Y/N values. You could also make it Boolean and use 1&0 values. 

 

Thanks,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Stacy
7 - Meteor

Thank you Kevin. I got it! I didn't change the string type. Thanks for the help!

Labels