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

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

 

Quasar

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

Spoiler
Challenge #154.PNG
Asteroid

It is not a thing of beauty....

Asteroid

T

h

a

t

 

i

s

 

f

u

n

n

y

Comet

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
Pulsar

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
Alteryx Certified Partner

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
Alteryx Certified Partner

That was fun! Here's my solution:

Spoiler
challenge 154.jpg
Alteryx Certified Partner

My solution -  dynamic only regarding number of tools.

Alteryx Certified Partner
Alteryx Certified Partner

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 reboot. Order shall return.