The Inspire Cyber Monday promo has been extended to Dec. 1! This offer is discounted off the Early Bird price and includes 20% off for conference-only passes and 10% off training passes.
alteryx Community

# Weekly Challenge

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.

## Challenge #59: Is it an Anagram?

Alteryx Alumni (Retired)

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.

20 - Arcturus

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

Happy Mardi Gras!

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
11 - Bolide

Here is my take on it.

Spoiler

5 - Atom

Here's my solution to the above.

Spoiler

7 - Meteor

Hi guys,

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

Spoiler

Have a great week!

Max

Alteryx

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

Spoiler

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

11 - Bolide

Simple and quick!  Nice work.

6 - Meteoroid

Here is my go at it!

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")