Alteryx Designer Desktop Discussions

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

TRIMMING AND RETAINING DIGITS

laaperex
6 - Meteoroid

how to make this consistent with only 8 digits? tried everything from trim to substring to padleft and right. really need it asap :( it will make duplicates everytime i trim and retain.


11105202
11106000
11106002
12150001
41412003
41412005
41412006
41412803
5151550000
5151550001
5151550002
5151551500
5151552000
5151552002
5151552007
5160600000
5160600001
71830000
71850000

14 REPLIES 14
laaperex
6 - Meteoroid

JUST LIKE THIS....

 

6151551303 Janitorial & Cleaning Supplies/Materials 1385781.72         51551303

6851551303 Material Issues - Consumable 126588.98                           51551303

 

the bold numbers are generated from doing padleft and subtring that causes duplicates. 

ShankerV
17 - Castor

Hi @laaperex 

 

I hope I understood your requirement correctly. 

Please find the solution below.

 

ShankerV_0-1668247588625.png

 

 

Many thanks

Shanker V

laaperex
6 - Meteoroid

hi. i did that before. however, it'll create duplicates. 

 

laaperex_0-1668247720772.png

 

ShankerV
17 - Castor

Step 1: Input 

Step 2: As the data's are in numbers Alteryx will directly consider as Double 

Use Select tool to convert to String

 

ShankerV_0-1668247669798.png

 

 

Step 3: Use Regex tool to get your output

 

ShankerV_1-1668247701181.png

 

Let me know if there's anything above I can clarify for you further. 

 

 

ShankerV
17 - Castor

From the output column, I have shared. Use the Unique tool to remove the duplicates.

 

That will resolve the issue.

ShankerV
17 - Castor

@laaperex 

Hope your issue is resolved.

If not let me know how your expected output should be, so can work on it.

 

Shanker V

laaperex
6 - Meteoroid

yes2 but they have different amounts. so i could not retain unique codes only :(

ShankerV
17 - Castor

@laaperex 

 

Sorry your output expectation is not clear, 

Can you explain it clearly. What is your expected output.

 

Shanker V

laaperex
6 - Meteoroid

i should remove those in red to create an 8 digit account number same with other accounts. however, the first 2 digits were removed 

laaperex_0-1668248156059.png

 

Labels