Challenge #59: Is it an Anagram?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Labels:
- Advanced
- Data Analysis
- Intermediate
- Join
- Parse
- Transform
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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}.
Happy Mardi Gras!
Mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here is my take on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi guys,
My solution is below, it is not the very optimized but it does the work ;)
Have a great week!
Max
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Simple and quick! Nice work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
OK I have a one tool solution :) (Technically two if the RecordId is required)
&& 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")
https://www.linkedin.com/in/adriley/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You're my hero
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.