Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Formula tool format result as number

parria1
アステロイド

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件の返信2
ponraj
パルサー

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

Datatype.png

ThizViz
ボリード

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
ラベル