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

Thanks for the Challenge, stray to the point 8 tools no macro

Alteryx Certified Partner

Challenge Completed

Alteryx Partner

Solution

Alteryx Partner

been struggling with making it dynamic, not to insert a single character/parameter that corresponds to the data or the count of rows in both inputs.

 

My solution attached

Atom

Hey everyone. Here's my dynamic solution (any number of options, and any number of states that those options can take), done without creating a macro.

 

Thanks for a fun challenge!

 

Sam

Asteroid

My solution

Here is my solution. Completely dynamic and without macros!

 

Spoiler
Untitled.png
Alteryx Certified Partner

Found two ways to do it. One uses Python,

 

Spoiler
Challenge 154 - Capture.PNGWorkflowChallenge 154 - Capture Python.PNGPython code
Alteryx Certified Partner

When I first saw this challenge I thought “oh boy” a challenge by the renowned @MarqueeCrew 

 

Then I took a look at the original question, and was none the wiser on how to solve this.

 

I somewhat quite quickly came up with a solution

 

Spoiler
Here is my first solution. I went with the Append tool to solve this, but the problem with this one, is that it is not very dynamic.2019-03-18 11_39_39-Alteryx Designer x64 - challenge_154_verakso_solution.yxmd.pngFirst Attemt

But I was not happy with it, after all it was a challenge by the great @MarqueeCrew 

 

So – I tried a little harder, to see if I could not solve this using an iterative macro, and wouldn't you know – after some persistency, I did manage to make a macro.

 

Spoiler

After some iterations – no pun intended – I did manage to get a macro working

2019-03-18 11_39_58-Alteryx Designer x64 - challenge_154_verakso_solution2.yxmd.pngWorkflow with MacroThe macro looks like this

2019-03-18 11_42_30-Alteryx Designer x64 - challenge_154_verakso_solution2.yxmc.pngThe Macro itselfAnd I even was able to test it with other switches than just Yes and No – and it seems working.
2019-03-18 11_40_11-Alteryx Designer x64 - challenge_154_verakso_solution2.yxmd.pngTest of Macro with more switches2019-03-18 11_40_35-Alteryx Designer x64 - challenge_154_verakso_solution2.yxmd.pngResult of testWell almost – there seems to be a bug in my logic so it you only have two options, like Apple and Orange, then my macro only spits out Apple 😢

 

But in the end, I am quite happy with my result, although it fades when you see the solution form the master himself.

 

 

 

 

 

Thanks for a great challenge @MarqueeCrew, @JoeM and the rest of you.

 

Still Climbing
/Thomas

 

Alteryx Certified Partner