Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

CONVERTING STRING TO NUMBER AND REMOVING COMMA IN THE FIGURES

dunkindonut7777
8 - Asteroid

Hi I have a problem converting the figures from string type of data to number format type of data. Because if I only use the select tool and change the data type it will rounded off and caused error. I would like to change the amount figures from string to number type of data. See sample below:

 

AmountData Type
6,216,000.00V_String
1,234V_String
-500,000.00V_String

 

From the table above I would like to be transformed it into:

 

AmountData Type
6216000.00Double
1234Double
-500000.00Double

 

Please help me to solve this one. Thank you!

3 REPLIES 3
grazitti_sapna
17 - Castor

Hi @dunkindonut7777 , try this. You can first use formula tool to replace the comma with a blank char. Then use select tool and convert the field into double.

grazitti_sapna_0-1613552206371.png

If this helps kindly mark this post as solution.

Thanks.

 

Sapna Gupta
JosephSerpis
17 - Castor
17 - Castor

Hi @dunkindonut7777 you will need to use a replace function to remove the commas. I mocked up an approach using a multi-field tool which shows how to do this as this is the only tool that can change the data format while applying a formula to a field. Let me know what you think?

 

Multi_Field_17022020.JPG

 

 

 

 

Emil_Kos
17 - Castor
17 - Castor

Hi @dunkindonut7777,

 

I have preapred a workflow for you:

 

Emil_Kos_0-1613552253022.png

 

I used this formula to remove,

 

Replace([Amount], ',', '')

 

Hope it helps 🙂 

 

Labels