Alteryx Designer Desktop Discussions

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

convert text to numeric- But retain comma and decimal

inumidun2009
Météore

Hi All,

 

I am bringing in data from database that reads my numeric data as text

Before conversion/Raw data: 50.456.492,96 and Text Data type (V_W String or String)

 

I tried using the select tool to convert back to numeric using Double but it outputs

After conversion using Select Tool: 50.456 and Numeric Data type (Double)

 

Also I tried using Regex_Replace but I guess I'm missing an input.

 

Intended Output: 50.456.492,96 and a Numeric Data type (Double)

 

Thank you all for your help.

5 RÉPONSES 5
KilianL
Alteryx Alumni (Retired)

Hey,

 

using a formula to replace the comma and dot like this: replace(replace([Field1],'.',''),',','.') makes the string easily convertible to double.

 

Then you can change in your user settings (options -> user settings -> localization) how you want decimal and thousand separators displayed.

 

See workflow attached.

inumidun2009
Météore

Hey KilianL,

 

Thanks a lot for your help. That works.

 

Though I went to (options -> user settings -> localization) but unable to see where to modify decimal and thousand separators.

 

Thank you.

 

 

 

KilianL
Alteryx Alumni (Retired)

Hey @inumidun2009,

 

great to hear it works now!

 

It is actually a new option for Version 20.4, so you will need to update your Software for it.

It looks like this:

KilianL_0-1611861499413.png

 

All the Best

Kilian Leifeld

Sales Engineer, Alteryx

 

inumidun2009
Météore

Thanks a lot, Kilian.

 

Kind regards.

Taiwo Adegoke.

falala
Atome

Thank you very much. It helped me a lot with a flow. You're awesome. 😁

Étiquettes