Alteryx Designer Desktop Discussions

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

Filter based on the first three digits

bdoni001
8 - Asteroid

Hello everyone, I need your help.

 

Below is the picture of a sample data for your reference.

 

bdoni001_0-1661848150710.png

 

I want to do a step-by-step filtering on the data above by using the Filter tool. My goal is to filter out the VAT Invoice Number that starts with "010" first, then the "020", then the "030", and it goes on until "090".

 

I really appreciate if anyone can teach me how do the above by using the Filter tool.

 

Best Regards,

Bona

3 REPLIES 3
DataNath
17 - Castor
17 - Castor

Hey @bdoni001, you can use the Startswith() function for this, in each subsequent Filter you'd just change the target string (i.e. the 010 part) in the example I've provided:

 

DataNath_0-1661849026727.png

bdoni001
8 - Asteroid

Thank you the response!

 

Let me try this and see what happens.

 

By any chance, do you also know what to do if we want to filter from the next three digits instead?

 

Regards,

Bona

DataNath
17 - Castor
17 - Castor

No problem @bdoni001 - there are various string functions that allow you to look at certain parts of a field. If you wanted to look at the next 3 digits (I'm guessing you mean the part between the . and - i.e. the 000 in all of these), you can use the substring function. Here I'm telling Alteryx to look at the 3 characters starting at position 4 (substring function is zero-based so the first character in the string is position 0), and check whether or not they're '000', which in your example they all are.

 

DataNath_0-1661849393375.png

Labels
Top Solution Authors