Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Converting character to a unique number

MarionD
7 - Meteor

Hello,

 

I need to convert strings (in my case countries) into unique code number.

I tried the function CharToInt, but it gives me identical numbers for different countries (for example 65 for australia, azerbaidjan, austria, argentina etc.).

Can someone explain me why ? Is there a solution to convert a string into a unique code ? 

 

Thank you

11 REPLIES 11
MarqueeCrew
20 - Arcturus
20 - Arcturus

@pcatterson,

 

Good point about the soundex.  This was a btw idea, but good to point it out.  There is a flexibility in a soundex construction of countries so that speling errors can be ignored.  The md5hash constructs a unique key for each variation of a country.  Something in-between is key.  In my "accepted" solution, I do recommend standardizing the country names.

 

 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
MarionD
7 - Meteor

That's great! Thank you very much for your time and the help :)

Labels
Top Solution Authors