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

Filtering by specific number of characters

tbrown06
6 - Meteoroid

I was wondering if it is possible to filter based on a specific number of characters? I have a product id field in my data and the id's are all 6 digits. There are also some cells in the field though that list out multiple ids in a cell in the following format ( 123456 | 123457 | 123458 | ...). Is it possible for me to filter down to just the cells that contain 6 characters?

4 REPLIES 4
Kenda
16 - Nebula
16 - Nebula

Hey @tbrown06! Try putting this formula in your Filter tool:

 

length(tostring([Field1]))==6

Hope this helps!

gnans19
11 - Bolide

Step 1: Create Record Id to enforce uniqueness

Step 2: Use text to columns and split values into multiple columns

Step 4: Transpose with record Id as group

Step 5: Create a flag for each value whether it's length is 6

Step 6: Summarize and Avg by RecordId and Value

 

Length.png

 

 

 

gnans19
11 - Bolide

@tbrown06, @Kenda

 

But how do you address 123456|111111 on the same row issue using simple length() function?

tbrown06
6 - Meteoroid

The format isn't really an issue. I just wanted to filter out the rows formatted that way because they contain multiple product ids. Your solution would work great if I wanted to separate out the ids in those cells and keep the ones that are 6 characters, but I don't need to. Appreciate the help though!

Labels