Alteryx Designer

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

Filter out row based on number of characters

Highlighted
7 - Meteor

Hello,

 

How do I filter out the rows based on number of characters in a column. So suppose if I have the table shown below:

 

DatabaseValue
SQL DBprod:5
SQL DBasdqweqweadasdasda
SQL DByoasdhakssda
Microsoft SQL Server24.54.68.4
Microsoft SQL Server182.18.18.18

 

And I want to only show the rows with less than 10 character in value column. How do I do that? My output should be like this:

 

DatabaseValue
SQL DBprod:5
Microsoft SQL Server24.54.68.4

 

Thanks!!

Highlighted
Alteryx
Alteryx

@bb 

 

Can use the Length function in a formula tool to get the length of a string, then can filter on that.

 

Quick example:

 

clipboard_image_0.png

 

 

Highlighted
14 - Magnetar
14 - Magnetar

Hi @bb 

 

Exactly what @NickSm  did.

You can also try this with just one tool. Add a filter, and use the Length([Value])<10 as the Custom condition. 

Let me know if this helps.

Cheers!

Esther 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @bb 

 

Watch out for extra whitespaces.


Adding to @NickSm  and @EstherB47  contribution, I'd put a Trim function just to make sure.

 

Length(Trim([Value])) < 10

 

Cheers,

 

 

Labels