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.
Announcement | Get certified today - take the Alteryx Designer Core and Advanced exams on-demand now!

Challenge #83: Pop-Tart and Beer Pairings

Highlighted
Director, Customer Enablement
Director, Customer Enablement

The solution to last week's challenge can be found here!

 

This week's challenge was submitted by the illustrious @MarqueeCrew who came across this challenge at a Tableau User Group! Yes - the problem really was around beer and Pop-Tart pairings.

 

At a recent Tableau User Group, a poll was conducted using SurveyMonkey and the data was exported to an Excel workbook. Unfortunately, the data wasn't in a format that made it easy to work with in Tableau. Fortunately, an Alteryx user was there to prep the data on their behalf.

Within the survey data, there are repeating groups of Pop-Tart, Beer and Score values. Yes, the TUG had samples of Pop-Tarts paired with the beers from Bell's Brewery. The task was to create a single column for each of these values, allowing for repeating the balance of the survey results.

Can you Normalize the output data? For bonus play, can you analyze the data and provide insights from the sample data?

The output should include:
1. Name of the fiber
2. The original spatial line object
3. The new spatial line object
4. New length of line

 

challenge83.pngThis is my vote for best pairing.

Alteryx Certified Partner

Can't say I have ever paired beer and poptarts together before!  Solution is attached.

Spoiler
Capture.PNG
I handle the pairing with the dedicated columns through transpose and then splitting the column name using the Regex tool.  For the custom pairings I used more of a brute force approach where I just renamed the fields and unioned everything together.  There has to be a better approach though.  

I then filtered out the null poptart rows and union the custom and standard fields together.

 

Alteryx Certified Partner

Tried without RegEx

 

Spoiler
88.png
Quasar
Quasar
Spoiler
Four reasonable tools (the two Multi-Field Formula tools could be replaced with a single Formula tool, but it would be a pain to write all those expressions):
c83.png
- Two Multi Field Formula tools to add the additional two columns for the main combos
- Arrange to reshape the data
- Filter to remove null records (removing records with null Pop-Tart matches the expected output)


I am not sure if there are any conclusions that can be drawn from the data, but here is a Linkert chart of the main combos:
Beer - Pop-Tart Linkert.png
Director, Customer Enablement
Director, Customer Enablement

I knew that the @Joe_Mako Arrange tool signature move would show up here! Love seeing you break that out every time!

Alteryx Certified Partner
Alteryx Certified Partner

I've tried to make this as dynamic as possible in case additional fields come into the data, etc.

 

Spoiler
Capture.PNG

@Joe_Mako's solution looks great, need to take a look at this in more detail!

Asteroid

 

 

 

Capture.GIF

 

Capture2.GIF

I handled the pairings with the dedicated columns through transpose and then splitting the column name using a simple replace formula, then split them out with the text to columns. then for the special pairings I used the arrange tool to create the 3 fields. then union the data together.

 

seems to work pretty well. 

 

Paul

Alteryx Certified Partner

I've never used Arrange tool before, so thanks @Joe_Mako for showing the use case for it. 

 

My solution attached, but I could probably improve it and get rid of the Join tool.

 

Spoiler
Screen Shot 2017-08-31 at 22.39.13.png

 

Spoiler
I used transpose and cross tabs like most other people. It's not as dynamic as some of the others here.
Capture.PNG

Went down a rabbit hole by using the Field Info tool, selecting column with a Formula, then trying to dynamically pull data from the desired columns.    But when I tried the Dynamic Select tool  things fell into place pretty quickly.    I had never used the Dynamic Select tool before, so this has been a fruitful exercise.

 

Spoiler

083 challenge.PNG

 

This can handle the additions or deletions of columns.