In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases 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
18 - Pollux
18 - Pollux

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

Carolina18
5 - Atom

Thanks a lot Alex! 

It worked just fine 😊

 
alexnajm
18 - Pollux
18 - Pollux

Great news!

Labels
Top Solution Authors