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.

Checking the digits

Feras95p
8 - Asteroid

Dear all,

 

I have a list of mobile phone numbers, which contains of 10 numbers some phone numbers have not been written correctly so, some phone numbers are contains more or less 10 digit number, I want to add a filter so that I will give my the numbers which are correct (have 10 digits number) the number which are less or more than 10 digit I want to get rid of them. How is it possible to do that in alteryx? 

3 REPLIES 3
AngelosPachis
16 - Nebula

Hi @Feras95p ,

 

You can first convert the phone numbers into a string data type and then use a length function to return the number of characters withing each string

 

AngelosPachis_0-1613031855993.png

 

If the number is 10, that will come out of the T output anchor of the filter.

 

Let me know if that worked for you.

 

Cheers,

 

Angelos

AntDavis42
7 - Meteor

Hi @Feras95p ,

 

You can also use the "ToString()" function in your statemen if you don't which to change the format type using a select tool.

AntDavis42_0-1613032996316.pngAntDavis42_1-1613033063566.png

 

SeanAdams
17 - Castor
17 - Castor

Along with the solutions @Feras95p and @AngelosPachis  have posted - you can use a data-cleanse tool to get rid of brackets, dashes and spaces, leaving only digits - and then use the length function in a function tool to check the remaining digits.

Labels