Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

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
6 - Meteoroid

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
10 - Fireball

@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
6 - Meteoroid

Thank you so much! That worked perfectly!

Labels