In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

General Discussions

Discuss any topics that are not product-specific here.
SOLVED

How do I remove the $ from a number without removing the negative dash

Lizbhernan
8 - Asteroid

I am working on a workflow and I am having issues removing the $ and ()  from my amounts with it also removing the -. I tried the formula   IIF(Contains([Reimbursement3], ''), +Trim([Reimbursement3],"($)"), [Reimbursement3]) and it did in fact remove the $ and (). However, it also removed the - on the negative amounts. I tried a few different things but nothing has worked. Does anyone have any suggestions on how I can remove the dollar sign and parenthesis and keep the -  example: ($307.96)

 

I have also included a sample of what I am working on and the desired results.

 

TIA for taking time to assist me.

2 REPLIES 2
Yoshiro_Fujimori
15 - Aurora
15 - Aurora

You can use the "(" sign in the orignal field.

Here is a sample solution.

 

Formula

new_Reimbursement3 = ToNumber(REGEX_Replace([Reimbursement3], "[$\(\)]", ""))

new_Reimbursement3 = IF StartsWith([Reimbursement3], "(") THEN [new_Reimbursement3] * -1 ELSE [new_Reimbursement3] ENDIF

 

Result

Reimbursement3new_Reimbursement3
($307.96)-307.96
$168.69168.69

 

I hope this helps.

Lizbhernan
8 - Asteroid

This worked, thank you so much @Yoshiro_Fujimori 

Labels
Top Solution Authors