How to convert the number "35.048,00-" to read as "-35,048.00"

Chetna
Registered Posts: 8 ✭✭
I want the sales amounts to be read as:
-35,048.00
2925.00
4000.00 etc
Answers
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,467 Neuron
What you got there are not numbers but strings that represent a number. You need to use a Prepare recipe. The first step is to move the sign the front of the number. For that use a Formula processor with this formula:
if(contains(dodgy_number, "-"), concat("-", chomp(dodgy_number, "-")), dodgy_number)
Then add a convert number formatd step from Italian to Raw. You now end with a proper number in the correct data type:
And finally you can format the number in another column to use for display purposes only:
-
Hi @Turribeach , Thanks a lot! Will try this out.