community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Community v19.6

Looks aren't everything... But the latest Community refresh looks darn good!

Learn More

Replace the test based on other texy

Meteor

i need to replace the if account is 20C02 THE affiliate should be zero as given below . Please advise . i have attached the screen shot 

 

 

Alteryx Certified Partner

Hi @draghava 

 

You can achieve this using a Formula tool which you should configure to apply to the [Affiliate] column. The formula will be something like this:

 

IF [Account] = '20C02' THEN 0 ELSE [Affiliate] ENDIF

 

I am assuming here that your Affiliate column has a numeric datatype but if not wrap the 0 in quotation marks e.g. '0'.

 

Many thanks,

 

Jamie 

Meteor

Thanks . But i got an below error message, 

 

Error: Formula (57): The formula "final amount " resulted in a string but the field is numeric. Use ToNumber(...) if this is correct. (Expression #1)

Bolide

When you create the formula change the field type to string. Or change the Affiliate column to a string field. Either should do the trick.

 

Seth

Labels