Start Free Trial

Alteryx Designer Desktop Discussions

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

Replace an endng "-" on a string field to a leading "-" so I can convert to a fixed decima

knamc_com
7 - Meteor

I have some data values coming over from a text file as :

 

805.99-

.78-

120.89-

 

I need to be able to convert/replace the ending "-" to a Leading so it will convert to a fixed decimal value.

 

They need to be:

-805.99

-.78

-120.89

 

I have tries several expressions, but no luck......could be late in the day on a Friday, lol

1 REPLY 1
alexnajm
19 - Altair
19 - Altair

IIF(EndsWith([Value], "-"), ToNumber("-"+ReplaceChar([Value],"-","")), ToNumber([Value])) should work

Replace an endng - on a string field to a leading - so I can convert to a fixed decima.png

Labels
Top Solution Authors