Alteryx Designer Desktop Discussions

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

Transformation All Column with _FF

VJ_88
8 - Asteroid
  1. We have to make sure if columns ending with _FF has only numeric values
  2. There are multiple columns hence I am tryin to use MULTI FIELD FORMULA with ENDSWITH(_CURRENTFIELDNAME_,'__FF')
  3. we want to replace anything other than number with -1
  4. Example if Column only has numbers keep like that
  5. if it has text or number with Text or number with special character and text  these column values will be replace by -1
  6. As these might be alphanumeric hence these are V_String datatype 
2 REPLIES 2
binuacs
21 - Polaris

@VJ_88 One way of doing this with the dynamic select tool

image.png

DataNath
17 - Castor
17 - Castor

Hey @VJ_88, is this what you're after? I've created an identical column next to the _FF version so you can see the before and after in one place, and that it discriminates based on the "_FF" suffix. Also wasn't sure if by numbers you meant strictly positive/negative and integers/floats, so have built something that handles them all:

 

IF EndsWith([_CurrentFieldName_], '_FF') THEN
  IF !REGEX_Match([_CurrentField_], "-?\d+(?:\.?\d+)?") THEN -1
  ELSE [_CurrentField_] ENDIF
ELSE [_CurrentField_]
ENDIF

 

Replace non-nums with -1.png

Labels
Top Solution Authors