Alteryx Designer Desktop Discussions

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

Formula tool format result as number

parria1
8 - Asteroid

I am creating a custom field by dividing my current fields [net]/[qty] to get the new PPT field.

The net and qty are both doubles format but for some reason the PPT is coming out as a V_Wstring which is not logical and I cannot do further calculating from this as it is not a number.

 

Is there a way to format my functions so the result is a number, like the CAST as DOUBLE function is SQL?

I tried ToNumber([net]/ToNumber[qty] and the result is still a string.

 

I know I can put in a select tool after the formula tool and change all these to doubles, but I'm looking for a way to do this inside the formula since it is more efficient. 

2 REPLIES 2
ponraj
13 - Pulsar

Formula tool has the option for changing output data type for the new field you create. 

Datatype.png

ThizViz
11 - Bolide

Yep, forgetting that little detail has bitten me on more than one occasion!

@thizviz aka cbridges, Bolide
http://community.alteryx.com/t5/user/viewprofilepage/user-id/2328
Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels