Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!
New content is available in Academy! You may need to clear your browser cache for an optimal viewing experience

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

 

This is my vote for best pairing.This is my vote for best pairing.

Highlighted
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.

 

Highlighted
Alteryx Certified Partner

Tried without RegEx

 

Spoiler
88.png
Highlighted
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
Highlighted
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!

Highlighted
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!

Highlighted
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

Highlighted
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

 

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

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.