community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.
Getting started with Designer? | Start your journey with our new Learning Path!

Challenge #59: Is it an Anagram?

Director, Customer Enablement
Director, Customer Enablement

The solution to last week's challenge can be found HERE.

 

This week, let's take a break from all of those business uses cases and have some fun! In this challenge, create a field that indicates whether two values in each row are anagrams for each other. An anagram is a word formed by re-arranging the letters of another word. In our case, all anagrams are one word and are not split to multiple. No letter can be used more than once, and all letters must be used.

 

Alteryx Certified Partner
Alteryx Certified Partner

Good morning @JoeM,

 

In my response I also added a TEST to determine if my results are correct.  It turns out that I learned something new here that might be useful to others.  It concerns Yes and No.  This might be obvious to everyone, but I am a binary in nature and like boolean variables.  Your results were Yes and No, so I had to reformat my boolean (True/False) results.  After writing the workflow, I found that if you SUMMARIZE data and look for the Minimum value of a field, that No is the minimum of {Yes, No}.

 

Spoiler
Capture.PNG

Happy Mardi Gras!

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Bolide

Here is my take on it. 

Spoiler
 Anagram Match.JPG
Alteryx Partner

Here's my solution to the above.

 

Spoiler
 

 

Highlighted
Meteor

Hi guys,

 

My solution is below, it is not the very optimized but it does the work ;)

 

Spoiler
Capture.PNG

Have a great week!

Max

Alteryx
Alteryx

@alex Mine was very similar to yours but I used one more summarise than I needed to

 

Spoiler
challenge59.png

Now to think if I can do it in any less tools :)

Adam Riley
Principal Software Engineer
Tech Lead Core Engines, Alteryx
Bolide

Simple and quick!  Nice work.

Meteoroid

Here is my go at it!

Alteryx
Alteryx

OK I have a one tool solution :) (Technically two if the RecordId is required)

 

Spoiler
iif(REGEX_CountMatches([word1], "a")==REGEX_CountMatches([word2], "a")
&& REGEX_CountMatches([word1], "b")==REGEX_CountMatches([word2], "b")
&& REGEX_CountMatches([word1], "c")==REGEX_CountMatches([word2], "c")
&& REGEX_CountMatches([word1], "d")==REGEX_CountMatches([word2], "d")
&& REGEX_CountMatches([word1], "e")==REGEX_CountMatches([word2], "e")
&& REGEX_CountMatches([word1], "f")==REGEX_CountMatches([word2], "f")
&& REGEX_CountMatches([word1], "g")==REGEX_CountMatches([word2], "g")
&& REGEX_CountMatches([word1], "h")==REGEX_CountMatches([word2], "h")
&& REGEX_CountMatches([word1], "i")==REGEX_CountMatches([word2], "i")
&& REGEX_CountMatches([word1], "j")==REGEX_CountMatches([word2], "j")
&& REGEX_CountMatches([word1], "k")==REGEX_CountMatches([word2], "k")
&& REGEX_CountMatches([word1], "l")==REGEX_CountMatches([word2], "l")
&& REGEX_CountMatches([word1], "m")==REGEX_CountMatches([word2], "m")
&& REGEX_CountMatches([word1], "n")==REGEX_CountMatches([word2], "n")
&& REGEX_CountMatches([word1], "o")==REGEX_CountMatches([word2], "o")
&& REGEX_CountMatches([word1], "p")==REGEX_CountMatches([word2], "p")
&& REGEX_CountMatches([word1], "q")==REGEX_CountMatches([word2], "q")
&& REGEX_CountMatches([word1], "r")==REGEX_CountMatches([word2], "r")
&& REGEX_CountMatches([word1], "s")==REGEX_CountMatches([word2], "s")
&& REGEX_CountMatches([word1], "t")==REGEX_CountMatches([word2], "t")
&& REGEX_CountMatches([word1], "u")==REGEX_CountMatches([word2], "u")
&& REGEX_CountMatches([word1], "v")==REGEX_CountMatches([word2], "v")
&& REGEX_CountMatches([word1], "w")==REGEX_CountMatches([word2], "w")
&& REGEX_CountMatches([word1], "x")==REGEX_CountMatches([word2], "x")
&& REGEX_CountMatches([word1], "y")==REGEX_CountMatches([word2], "y")
&& REGEX_CountMatches([word1], "z")==REGEX_CountMatches([word2], "z"),
"Yes", "No")
Adam Riley
Principal Software Engineer
Tech Lead Core Engines, Alteryx
Alteryx Certified Partner
Alteryx Certified Partner

@AdamR,

 

You're my hero

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.