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

IF formula to only apply to STRING values

Goldeyrien
6 - Meteoroid

Hi Community,

 

I have a data input field that is sometimes a string value (e.g. "€ 260.34") and sometimes a numeric value (e.g. "260.34") which makes it problematic as I need to sum the balances.

 

When it's a string value I was able to successfully use a REGEX_REPLACE function to strip out the preceding currency symbol and white space before the number but when it the field is a number it throws an error.

 

Goldeyrien_1-1685837440875.png

 

 

Is there a way to apply an IF formula to only apply the REGEX_REPLACE function if the field is a string value and to skip if it is a numeric value?

 

Of course, I am open to any other solution you may suggest.  Thank you.

 

2 REPLIES 2
Qiu
21 - Polaris
21 - Polaris

@Goldeyrien 
I think we can use the RegMatch for the purpose there.

Or we can use the Find and Replace tool with pre-defined currency table.

0604-Goldeyrien-A.PNG0604-Goldeyrien-B.PNG

Goldeyrien
6 - Meteoroid

Fantastic.  Thank you Qiu!

Labels