Free Trial

Alteryx Designer Desktop Discussions

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

Formula to strip off letters in a column not working

MikeFrancis1959
8 - Asteroid

I have formula (see below) that is part of a larger set of formulas but the formula below is not doing what I wanted it to do, I have a column with that has a date with the letters ETA with it like 

ETA 05/26/23   and I just want to strip off the "ETA" and just leave 05/26/23 but it stays the same ETA 05/26/23 and nothing gets stripped off . I tried replacing the formula with "Left" and nothing changes either and I know it is something simple but I cannot figure out what it is, can someone help?

Thanks,

Mike

 

ELSEIF Contains([2nd GI],"ETA")
THEN Right(Replace([2nd GI], "ETA", ""),5)

 

example ETA 0526/23

Want it to be  05/26/23

11 REPLIES 11
ChrisTX
16 - Nebula
16 - Nebula

Try

THEN Trim(Replace([2nd GI], "ETA", ""))

MikeFrancis1959
8 - Asteroid

it did not strip of the ETA

Mike

ChrisTX
16 - Nebula
16 - Nebula

Maybe something above the ELSEIF is being executed?  Can you send sample input data and the full IF statement?

MikeFrancis1959
8 - Asteroid

I highlighted the formula with a comment box that is red

Thanks,

Mike

nagakavyasri
12 - Quasar

if ETA is in same position throughout the column, then try this

Screenshot 2023-05-23 153559.png

 

ChrisTX
16 - Nebula
16 - Nebula

The YXMD file doesn't include your input XLSX file.  Need to use the menu... Options > Export Workflow to create a YXZP file.

MikeFrancis1959
8 - Asteroid

Try this

nagakavyasri
12 - Quasar

The condition is satisfied in 1st IF statement, so it is not going to further Elseif conditions. The 1st condition says !isempty[2nd GI], as the [2nd GI] is not empty, the same is returned. 

Screenshot 2023-05-23 160209.png

 

Try changing the 1st condition so that Contains function works, like this:

Screenshot 2023-05-23 160656.png

 

 

 

 

MikeFrancis1959
8 - Asteroid

I am not sure what part of the formula to change, can you show me what you mean?

Mike

Labels
Top Solution Authors