cancel
Showing results for 
Search instead for 
Did you mean: 

Finding patterns in Phone Attribute

NiCd Battery
I have a phone attribute and I want to find the patterns. For example, how many ########## or how many are (###)###_#### or how many are ######### or how many are # or # ### ### #### etc.

Can you help me with this?
Labels (1)
0 Kudos
2 Replies
Highlighted
DC Motor
Step 1: Convert the Phone Number Column that you have into text using the change into text option using our column operation menu.
Image: https://us.v-cdn.net/6030933/uploads/editor/88/ownqn8zdwa5d.png

Step 2: Use a compute column to replace all the numbers in the phone number column with a # using the following compute Statement
Image: https://us.v-cdn.net/6030933/uploads/editor/lp/ub93sxqu1cll.png

Step 3: Then use a shape operation to do a group by on Phone Number Pattern and use count as an aggregate to get your desired output.
Image: https://us.v-cdn.net/6030933/uploads/editor/yp/mzrqjr3akzil.png

Note: You could use STR(REGEX(@Phone Numbers@,"[0-9]","#")) in the second step and ignore the first step as an alternative solution.
0 Kudos
Highlighted
NiCd Battery
Thank you, Akshay!
0 Kudos