Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Convert Canadian Postal Code Ranges to Individual Values

merickson
6 - Meteoroid

I am working with a freight carrier who can only provide the Canadian postal codes where a surcharges is applicable in ranges. I need to break them out into individual codes to compare them to another carrier.  The Canadian postal code is a six-character string that forms part of a postal address in Canada. The postal codes are alphanumeric. They are in the format A1A1A1, where A is a letter and 1 is a digit. Any help on this would be appreciated. 

13 REPLIES 13
Philip
12 - Quasar

I'm not sure I understand. Could you take the first two rows and create the output you would like?

JordanB
Alteryx
Alteryx

@merickson

 

I have attached workflow which uses regex to split the alphanumeric parts. Similar to @Philip not quite sure what the outcome you want is but this should give you a a start. 

 

Best,

 

Jordan Barker

Solutions Consultant 

merickson
6 - Meteoroid

I have attached a complete list of Canadian postal codes. The overall objective is to identify which codes fall into the range on each record. I have highlighted the postal codes that would fall into the first range (record#1).  E6A1A0-E6A1Z9. Thanks for your help. 

Philip
12 - Quasar

I have a solution, but can't seem to post the Alteryx Zipped solution (getting "The contents of the attachment doesn't match its file type.") I'll try sending by PM.

JordanB
Alteryx
Alteryx

Hi @merickson

 

Heres my workflow suggestion. I just took a unique code from each (first four alphanumeric values) to join back up and get your ranges next to the zipcode values. 

 

Best,

 

Jordan Barker

Solutions Consultant 

 

JordanB
Alteryx
Alteryx

@Philip unfortunately you cannot post yxzp files to the community. 

Philip
12 - Quasar

That's strange. I thought I had before. Here's my solution.

Philip
12 - Quasar

@JordanB I did upload a yxzp file here:

http://community.alteryx.com/t5/Advanced-Analytics/Is-it-possible-to-make-alteryx-workflow-same-as-A...

 

Is there different posting rules for the Advanced Analytics area?

JordanB
Alteryx
Alteryx

@Philip

 

Each knowledgebase has its own rules regarding publishing file types. 

 

Best,

 

Jordan Barker

Solutions Consultant 

Labels
Top Solution Authors