Alteryx Designer Desktop Discussions

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

String to Number

johnrexrima_19
8 - Asteroid

Hello,

 

In my workflow, my input file is in CSV format so the data types are all in a string. Will it be possible to convert string to a number(double). I am trying to do that but what happens is that it only picks up the numbers prior to the first comma of the Real Gain/Loss (Base) column (see example below).

 

Values in String format

johnrexrima_19_1-1600847479569.png

johnrexrima_19_0-1600847429063.png

 

Values in Double format

johnrexrima_19_2-1600847542788.png

johnrexrima_19_3-1600847716383.png

 

4 REPLIES 4
Emil_Kos
17 - Castor
17 - Castor

Hi @johnrexrima_19,

 

Use the data cleansing tool to remove punctuation from this field. Afterwards you will be able to change the data type without truncating data.

 

Emil_Kos_0-1600848184283.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @johnrexrima_19 ,

 

take a look at AutoField tool.

 

https://help.alteryx.com/2018.2/AutoField.htm

 

If its in a certain format it will convert it to it.

 

Hope this helps.

seinchyiwoo
Alteryx Alumni (Retired)

Hi,

 

You would need to clean up the comma first (using formula) before you can convert them to double.

See attached workflow.

seinchyiwoo_0-1600849376831.png

 

johnrexrima_19
8 - Asteroid

Thank you all for your suggestions! Appreciate it! 

 

@seinchyiwoo  the formula tool works perfectly! Thanks so much!

Labels