Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Number keeps getting truncated

NY2BOS
7 - Meteor

Hi all, 

I have a string number (12,324.23) i converted it to a number using float, but it got rid of everything after the , so it only shows 12. 

Thank you in advance

2 REPLIES 2
griffinwelsh
12 - Quasar

Make sure you remove the comma before changing the data type to a numeric type like float.

You can use the formula tool with this formula: Replace([Your Field Name], ",", "") to remove all commas before converting.

If you still have the issue ensure you have selected a large enough size for your float.

 

Hub119
11 - Bolide
11 - Bolide

@NY2BOS The quickest way to fix this is to remove the non-number character from your string field before you convert it to a number. To do so, you could just use a formula tool to replace the ',' character with nothing '' using a formula this this: Replace([FieldName], ',', '').  Then when you convert it to a number (whether doing so in the formula tool itself or I'm guessing you did this with a select tool?) it should then update as expected.

Labels