Start Free Trial

Alteryx Designer Desktop Discussions

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

Formula syntax may be incorrect

Deano478
12 - Quasar

Hi all,

 

I have an expression like so: Replace([_CurrentField_], 'Sum_', "") AND Replace([_CurrentField_], 'First_', "")

 

However when I run the function I just renames the columns with names like so: 

 

0.000000

0.000002

 

and so any input on what i'm doing wrong is very much appreciated

 

3 REPLIES 3
Prometheus
12 - Quasar

@Deano478 Try using Replace([_CurrentField_], 'Sum_', "") in one expression window and Replace([_CurrentField_], 'First_', "") in another expression window that refers to the same column.

Deano478
12 - Quasar

I did a bit more tweaking and was able to just rejig my expression like so:

 

IF Contains([_CurrentField_], 'Sum_') Then Replace([_CurrentField_], 'Sum_', "") ELSEIF Contains([_CurrentField_], 'First_') Then Replace([_CurrentField_], 'First_',"") ELSE [_CurrentField_] ENDIF

 

thank you @Prometheus  for taking the time 

binu_acs
21 - Polaris

@Deano478 Another option with nested Replace function

 

Replace(Replace([_CurrentField_], 'Sum_', ""), 'First_', "")

Labels
Top Solution Authors