Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

String length -1 ?

Hamder83
11 - Bolide

Hi 

I have a series of strings including a control digit - i wanna compare to a 2. data source were the string comes without the control digit.

So basicly i wanna do string length -1 .. since the string comes in various lengths, i cant just do a left ..

So?

2 REPLIES 2
WilliamR
Alteryx
Alteryx

Hello @Hamder83 ,

can you give us some data as an example?

RolandSchubert
16 - Nebula
16 - Nebula

Hi @Hamder83 ,

 

you could use the formula

LEFT([Field], LENGTH([Field]) - 1)

with LENGTH finding the number of characters in string. If there are strings with length 1 within the column, you should add a condition to check:

IF(LENGTH([Field]) > 1 THEN

LEFT([Field], LENGTH([Field]) - 1)

ELSE

[Field]

ENDIF

 

Hope this is helpful

 

Best

 

Roland

 

Labels