Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

characters dropped in formula

Inactive User
Not applicable

Hi, i was wondering if anyone could help me out and explain why the 'o' in 'nov' is being dropped in the output of my formula.

As you can see the formula works fine for 'oct' (and all other months) but I dont understand why it won't work for 'nov'. 

5 REPLIES 5
Greg_Murray
12 - Quasar

Hi @Inactive User,

 

It looks like you are using the replacechar function when you actually want the replace function. 

 

Greg_Murray_0-1604933085378.png

 

Greg

 

echuong1
Alteryx Alumni (Retired)

There are a couple of ways to do this, but using RegEx might be the most accurate. Try using this:(\w{3}\s\d+.+\d{4})\sTo

 

It is looking for 3 letters, a space, digits, something in between, then 4 digits followed by a space and "To".

 

echuong1_0-1604935040340.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @Inactive User 

 

You need to use Replace instead of ReplaceChar

 

ReplaceChar finds each char in the string and replaces it.

Inactive User
Not applicable

kb355_2-1604938934312.png

 

 

 Hi, this my result from using the Replace formula rather than ReplaceChar - i am still not achieving the desired result. 

 

I still dont really understand why the issue is happening in some months and not in others?

atcodedog05
22 - Nova
22 - Nova

Hi @Inactive User 

 

Here is the explanation so When you are using ReplaceChar([Field],"From","")

 

It considers characters separately F,r,o,m all case sensitive.

So since Nov has 'o' its replaced becomes Nv. But since Oct has upper O and not lower o its not replaced.

In similar way F is replaced from Feb becomes eb. But M is not replaced from March because different case 

 

Replace considers complete string only replace word From not alphabets.

 

Hope this clarifies 🙂

Labels