How do I get rid of all the data after a digit?
Ex. I am annotating data from a pdf and it's pulling in "-125. |"
I want to remove everything after the period so it's just "-125" I still need the '-' so the number stays negative
Solved! Go to Solution.
@LexiC assuming it is coming in as a string field, you can use this in a subsequent formula tool to keep the -`15 you are needing.
ToNumber(Replace([Value], ".|", ""))
I don't think that works because I don't think Alteryx see's the numbers a value. I have to convert it to a number when I export to excel.
You can place a Select tool immediately following the Formula tool to convert it to a numeric field (Double, etc.). Once exported in to Excel, it will read it as a number while maintaining the negative sign.
You could use regex \..*$ to remove everything after the "."
@LexiC one option with regex
thanks very much - it worked perfectly!