Free Trial

Alteryx Designer Desktop Discussions

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

Identifying Values in Alphabetical Range

Acnelson312
5 - Atom

Hi guys, 

 

So I am trying to utilize Alteryx to identify values that fall into an alphabetical range. I'd like to get an output of a list that can possibly be grouped by an identifier. 

 

To start I'd have a list of items (there could be 100 or could be 100,000) that can be possibly values given out. The list could have any combination that begins with letters, and have numbers in it. 

 

Example:

Combination1

Comb124

Combo1

Combin

ACombo1242

bigcombo421

figure01

test102k

etc....

 

Then I'd have a range that I want to Identify which of those values would fall into it. So if I am given a range A-B, I'd get all the ones starting with A up to starting with B. (ACombo1242, bigcombo421).

 

A-F would return:

Combination1

Comb124

Combo1

Combin

ACombo1242

bigcombo421

figure01

 

Any ideas on how I should approach this? Any help would be much appreciated. 

 

Thanks!

5 REPLIES 5
CharlieS
17 - Castor
17 - Castor

@Acnelson312

 

I built a macro that will accomplish this task. Connect this macro and select the field you'd like to filter based on the first letter. Then enter two letter for the filter range. Let me know if you have any questions.

 

 

ponraj
13 - Pulsar

Attaching a sample workflow for your case....

 

Workflow.PNGResults.PNG

CharlieS
17 - Castor
17 - Castor

@ponraj

 

Awesome use of "CharToInt" and "CharFromInt".

MarqueeCrew
20 - Arcturus
20 - Arcturus

@Acnelson312,

 

Sorry that I am late to the party, but I'm going to demonstrate my love for Regular Expressions here:

 

capture.png

 

REGEX_Match([Input], "[A-D].*")

This filter is looking for anything that begins with the letter A, B, C or D.

 

If I wanted to look for A-D or 1-4, then it would be:

REGEX_Match([Input], "[A-D1-4].*")

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Acnelson312
5 - Atom

Some great approaches to solving this and I appreciate it! I am still working through it, but will be using a mix of the first and third solution. Much thanks!

Labels
Top Solution Authors