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.
SOLVED

Filter line which contain 10 digits

tom05
6 - Meteoroid

Hello - I have a data set where I am looking to filter out all line which are not 10 digits.

 

See example data attached.

 

After the filter I want to be left only with those lines which contained exactly 10 digits in the 'code' column, removed any which are above or below 10.

 

Thanks

4 REPLIES 4
PhilipMannering
16 - Nebula
16 - Nebula

in the filter tool you can use the expression,

 

 

 

 

regex_match(tostring(Code), '\d{10}')

 

 

 

 

Hope this helps! 

atcodedog05
22 - Nova
22 - Nova

Hi @tom05 

 

Here is a workflow for the task.

Filter

Length(ToString([Code]))>=10

Workflow:

atcodedog05_0-1605873615773.png

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @tom05 

 

Cheers and Happy Analyzing 😀

 

Feel free to reach out if you face any other issues 🙂

PhilipMannering
16 - Nebula
16 - Nebula

@atcodedog05 solution is better. I don't know why I always turn to Regex, it's a disease.

Labels