We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Calculate amount of letters and digit in a string

faiqz
8 - Asteroid

Hi, I will go straight to the question.

I have a list of business names. For example:

IDbusiness names

1

Apple Inc
221st Century Fix
31990 moons

 

By using Alteryx, I need to find the amount of letters and digits used in the name. For example if the string contain letters (eg :pen) then the result will display '3d'. If the string contains both letters and numbers (eg: 123abc) then the result will display '3t3d'. 't' represent the digits while 'd' represent letters (a-z). if the string contain 3 letters, then the result will display '3d'.

 

Okay, so for the result of the dummy dataset of the business names above, it will result to this:

 

IDbusiness names

result

1

Apple Inc8d
221st Century Fix2t12d
3golive906d2t

I'm still novice in Alteryx so I haven't explore widely the usage of Alteryx yet. I hope the experts that saw my post here will be able to help and assist me to complete my task. Thank you

6 REPLIES 6
faiqz
8 - Asteroid

I'm sorry for the inconsistency of the dummy data values in column business names.

messi007
15 - Aurora
15 - Aurora

@faiqz,

 

Please see below :

 

messi007_0-1647592121595.png

 

Attached the workflow,

Regards,

Prime.PNG

faiqz
8 - Asteroid

Hi! This is awesome, Thank you for your kind and warm respond. I am just wondering. What if the business names has digits at the end of the string?

 

For example:

Cat90, the result will be 3d2t

01Apple, the result will be 2t5d

 

Is it possible to rearrange the pattern according to the string?

binuacs
21 - Polaris

@faiqz I updated @messi007 workflow 

binuacs_0-1647597504120.png

 

PhilipMannering
16 - Nebula
16 - Nebula

Another potential solution. Should be dynamic,

PhilipMannering_0-1647599193209.png

 

faiqz
8 - Asteroid

Hi!

 

Sorry for the late reply. Yes this is the solution that I want. Thank you, I hope I can be as good as you in using alteryx in the future

Labels
Top Solution Authors