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

Alteryx designer Discussions

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

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More
SOLVED

How to assign group name to range of non-numeric values??

Need help in assigning a group to a set of data using a range of values.  The groups and ranges are defined in data set #1.  The values (names) are defined in data set #2.  How do I have Alteryx evaluate the group ranges, look up the values based on last name in data set #2, and produce the resulting data set below?

 

Data Set #1

 

GroupFromTo
A Thru LA*L*
Halperin Thru GeorgeHalperinGeorge
A OnlyA* 

 

Data Set #2

 

First NameLast Name
PatrickAnderson
TylerBruce
AlbertFelts
EmmaHalo
SarahHalperin
FreddyGeorge
AnneJackson
TerryMyers
BrandonTaylor

 

Resulting Data Set

 

GroupFirst NameLast Name
A Thru LPatrickAnderson
A Thru LTylerBruce
A Thru LAlbertFelts
A Thru LEmmaHalo
A Thru LSarahHalperin
A Thru LFreddyGeorge
A Thru LAnneJackson
Halperin Thru GeorgeSarahHalperin
Halperin Thru GeorgeFreddyGeorge
A OnlyPatrickAnderson
ACE Emeritus
ACE Emeritus

Hi @thepekingduk

Just for clarification, if there is a wildcard, it just returns everything starting with the given characters; but if there is no wildcard, then it needs to return find the row matching the first LastName, and the row matching the second last name, and return all rows in between, regardless of alphabetization?  (In the example provided, Halperin is alphabetically before George so an alpha match would never return rows... if we fix it a grab from George to Halperin, we would also get Halo in the result set).

 

The attached solution works using an alphabetical selection, not using a row-wise approach, which is, I'm hoping, what you're after:

alphaSelectGrp.png

 

Hope it helps either way!

 - John

 

Thanks johnjps!  Yes, my brain wasn't working right when mocking up the data. The routine you provided solves my issue!!

Labels