Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

If Then Statement with Division

hendricksk
7 - Meteor

I have an IF Then statement that needs a division with an integer but I can't get it to work.

 

IF StartsWith([Tag], "SLF") THEN [PRICING]/ELSE [Pricing] ENDIF

 

The formula doesn't like the number 5. Any ideas?

2 REPLIES 2
cpet13
11 - Bolide

@hendricksk  check if the variable Pricing is set to be a numeric data type. If it is set to be a string, it can't do a division function. It may not be the 5 it does not like, but the PRICING variable. Use ToNumber([PRICING])/5 instead of just [PRICING]/5 ELSE ToNumber([PRICING]).

hendricksk
7 - Meteor

Thank you so much! That worked perfectly!

Labels
Top Solution Authors