Alteryx designer Discussions

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

Formula Gives Result in text form

Highlighted
Meteoroid

Hi,

The below formula that I use gives me the result in text form.

Can I modify the same formula to get the result in number format?

Thanks,

 

IF tonumber([PPV Quantity])<0 THEN tonumber([PPV Quantity])*-1 elseif tonumber([PPV Quantity])>0 then tonumber([PPV Quantity])*1 else "0" endif

Highlighted
Quasar

Hi @Pushpendra_1 ,

Try  else  0   i.e   formula  results are numbers  for  all conditions .

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner
Else "0" should be:

Else 0

Then you should be able to type the field as numeric.

Cheers,

Mark
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Magnetar
Magnetar

@Pushpendra_1 

 

Are you creating a new field in a Formula tool? If so, in the drop down, select one of the numeric types. Also, just delete the quotes around the 0 in the very last portion of your expression.

 

Hope this helps!

Labels