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

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #59: Is it an Anagram?

Natasha
9 - Comet

Hi everyone,

 

I decided to share my solution as well.

 

Since I am learning Alteryx for one week only and didn't know about the Tokenize tool, I used a rather lengthy approach.

 

Spoiler
Screen Shot 2017-02-27 at 22.56.03.png

 

NicoleJohnson
ACE Emeritus
ACE Emeritus

Here's my solution. Definitely borrowed the minimum of Yes/No in the Summarize tool from @MarqueeCrew... thanks!!

Spoiler
WeeklyChallenge59.JPG

 

Coxta45
11 - Bolide

Kudos, @AdamR_AYX.  However, I must say this won't work for compound words or words that contain accents/special characters ;-)

Coxta45
11 - Bolide

A similar, yet very slightly different approach...

 

Spoiler
WC59.JPG

 

 Taylor Cox

 

PaulRB
8 - Asteroid
Spoiler
Capture2.PNGCapture.PNG

I used an iterative macro to create every anagram of word1. Not a very efficient approach. But different!

 

JoshK_dup_167
6 - Meteoroid

This is definitely too convoluted, but here is my solution.

MichaelWalsh
5 - Atom

I hadn't used tokenize before, so this was a nice opportunity.  I would appreciate some critical feedback, I am working mostly in a bubble, so I am happy for input.

MarqueeCrew
20 - Arcturus
20 - Arcturus

@MichaelWalsh,

 

You can look at my solution for clarification of my comments.  It isn't that mine is right (because we get to the same solution), but since you asked I will give you critical feedback.

 

  • No documentation or annotation
  • If you transpose the data before your tokenize it, you will have a more simplified workflow.  The tokenize function is identical for word1 and word 2, so think in terms of how you can avoid the duplicate tokenize & summarize and then the need to join the data back together again (twice).  I don't know about that unique tool, but all of that could be simplified.

When you see a post by @AdamR_AYX, read it.

 

I went down the same path with counting each letter.  Later, I realized the rules of the anagram didn't care about counts.  What really mattered was that the alphabetized order of all letters between the two words had to be an exact match:  LISTEN & SILENT both become:  EILNST

 

If you solve each word to become the component letters like that, if they match then they are anagrams.

 

We both could improve our workflows with that in mind.

 

Cheers,
Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
DinoF
6 - Meteoroid

Hi there,

Please find my script enclosed.

At first i was aiming to use the fuzzy match with the key generation on Whole Field and matching on levenshtein distance but somehow (and i was like a day on it without understanding why to day) it only compared and output a match on the first word, everything else was a match between the same word ( meaning Record 1 with Record 1)... I've tried the Purge and Merde mode (with different IDs on word 1 and 2 to make it looks like it's coming from two diferent sources), I've tried different key generation (Double metaphone) and matching (Jaro distance), it's driving me nuts.

I can post this script that failed but if someone has an explaination that will ease my sleep.

Cheers

paul_houghton
12 - Quasar

Doing a little catch up and completed this. It feels like I have used way more tools than needed but it got the result.

 

Spoiler
Week 59 Solution.jpg