Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Convert numbers storaged in a csv file as V_Wstring to a negative number (double)

Carolina18
5 - Atom

Hi all, I´m trying to convert numbers storaged as V_Wstring in a csv file to a negative number.

The csv format storage the negative numbers with () (ex.: (238,456,791)

I tried two ways

  • Changing the data type from V_Wstring to Double and Float (in this case brings only the digits before the first comma)
  • Using the "ToNumber" formula (in this case brings the positive numbers correctly but shows a warning conversion regarding the negative ones)

If any additional data or screenshot is helpful please let me know and I´ll add it

Thanks a lot in advance!

3 REPLIES 3
alexnajm
17 - Castor
17 - Castor

Try ToNumber(Replace(Replace([Field],"(","-"),")",""))

Carolina18
5 - Atom

Thanks a lot Alex! 

It worked just fine 😊

 
alexnajm
17 - Castor
17 - Castor

Great news!

Labels