Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Converting text to number (from European to American decimal system)

GaRaGe
8 - Asteroid

I have a data set with a character field which has basically numbers in European decimal convention (E.g. "2.567,834", "88.212,091"). I need to convert this field to numeric and also change the decimal convention to the American format (E.g. 2567.834, 88212.091). 

 

Is there a way to do it in Alteryx?

2 REPLIES 2
DataBlender
11 - Bolide

Hi @GaRaGe, you'll need to use the Replace function in the formula tool to replace '.' with nothing and then commas with a decimal point:

 

Replace(Replace([Field],".",""),",",".")

 

Then you can add a select after and change to a numerical datatype.

 

 

Niekka
6 - Meteoroid

Hi GaRaGe,

 

A quick and dirty way of doing it would be in a Formula tool, just update the [Number] field as such: ReplaceChar(ReplaceChar([Number],".",""),",",".")

This will result in a string, if you need it to be a number in your local settings just add ToNumber() to the whole string. (mine is European so that would just revert back to original string)

 

Hope this helps

 

//Anders

Labels