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

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 #154: Permute the Data

karp
6 - Meteoroid

Here's my solution.  It's dynamic in the sense that the workflow will adjust itself based on the quantity of tools being input...in theory.  For full dynamic ability, I would have to make a dynamic append macro.  Interesting challenge, but I'm already crunched for time today :)  Actually, that was my starting thought.  Upon closer review, I summarize to get max records but ended up not using it.  The intent was to take that value for a dynamic append macro.

 

All that being said, my solution is still a $5 answer to a $100 question.  It works due to "On " (there's a blank in the quotes) and "Off" strings being 3 characters each.  Laziness traded for expediency I suppose!  (insert Bill Gates quote here)

 

Screenshot:

Spoiler

 

solution.PNG

 

kat
12 - Quasar

Not what you'd call elegant, but for today, this'll have to do

Spoiler
Challenge #154.PNG
papalow
8 - Asteroid

It is not a thing of beauty....

papalow
8 - Asteroid

T

h

a

t

 

i

s

 

f

u

n

n

y

T_Willins
14 - Magnetar
14 - Magnetar

Made me remember my high school math.  Complex, but dynamic solution.  Should allow for any number of Option 1 or Option 2 variables.  Likely could make this much simpler, but real work using Alteryx took my time today (Data mining 126 Excel workbooks - no problem). 

 

Spoiler
Workflow 154.GIF
estherb47
15 - Aurora
15 - Aurora

Totally brute force here, and I want to create a more dynamic solution that can handle multiple toggles as well as multiple inputs. But it's a start.

Spoiler
image.png
JoshuaGostick
11 - Bolide

Not very dynamic as you'll need to add an extra Append tool for each extra tool options. However, it's a relatively straightforward workflow and it works for this challenge!

Spoiler
challenge_154.PNG
Wouter
8 - Asteroid

That was fun! Here's my solution:

Spoiler
challenge 154.jpg
RolandSchubert
16 - Nebula
16 - Nebula

My solution -  dynamic only regarding number of tools.

MarqueeCrew
20 - Arcturus
20 - Arcturus

Here is my dynamic solution in a picture:

Spoiler
capture.jpg

The way it works (dynamic):

Spoiler
I compute the number of permutations and generate the number of rows necessary to create the needed on/off (or other choices) states.  By combining the options into a single string I found it a simple way to dynamically handle the options and states.

This workflow helped the user and was a fun challenge for @patrick_digan and @patrick_mcauliffe  to chat about offline.  Even @JoeM  thought that this was just a simple use of an append fields tool (before he dug into it).  But Joe's a nice guy and he put the dynamic nature of the workflow as an extra credit option.  No brute force here @estherb47.  

 

Cheers,


Mark

Alteryx ACE & Top Community Contributor

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