In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Convert list of zip codes into ranges

PRossi
5 - Atom

I have a list of zip codes with corresponding territories but what I need is a territory and the corresponding min max zip code range for all territoies and zip values. For example:

 

 Zip Terr

 1

 T1
 2 T1
 3 T1
 4 T2
 5 T1
 6 T1
 7 T1

 

would return

 

 Terr Zip Start Zip End
T113
T244
 T15 7

 

Thought Tile would work but I played around with a few settings and had no luck. I was able to use a multi row formula to tell me if the zip code had the same territory as the row above it which I think is on the right track but I'm pretty sure there may be a better way.

 

Thanks!

3 REPLIES 3
patrick_digan
17 - Castor
17 - Castor

@PRossi It seems to me like the summarize tool would accomplish that. I've attached a quick sample.

JohnJPS
15 - Aurora

If I'm understanding this correctly, there is a space in front of the second set of " T1" entries, which allows the simple summarize to work correctly. But, if that space is errant and should be removed, then the T1's will all group together and we'll only get two final results, rather than three.  If the question is how to get three results, the fix then would be to build a "rank" using MultiRow Formula, and group on that rather than Territory. (See attached).

 

(edit: modified workflow to join back to original).

PRossi
5 - Atom

Thank you, that is exactly what I was looking for, yes the space before T1 was in error.

Labels
Top Solution Authors