community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

Filtering by specific number of characters

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?

Pulsar

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

 

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

Hope this helps!

Alteryx Certified Partner

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

 

 

 

Alteryx Certified Partner

@tbrown06, @BarnesK

 

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

Highlighted
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