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 #49: Reformatting Transactional Data

Alteryx Alumni (Retired)

The link to last week’s challenge is HERE.

 

This week’s exercise is another example of how Alteryx can take poorly formatted data such as transactional log files and turn it into usable data.

 

Use Case:  A customer has some data that comes with key product information stored at the top of the file.  Each data column contains three lines of header information per product (product, market and type).  The customer wants this information to be shown in rows for each product.

 

Objective:  Reformat the input data to match the output example.

 
Quasar
Quasar
Spoiler
Weekly 50.png
Alteryx Partner
Spoiler
Exercise 50.PNG

My solution slightly different but gives the same results. 

 

Creative Director
Creative Director

A solution has been posted (it looks just like yours @Joe_Mako). Thanks for sharing yours too, @MichelKars.

Spoiler
2016-11-21 08_44_49-Alteryx Designer x64 BETA - DataPrep_ReformattingData_Solution.yxmd.png
Tara McCoy
Alteryx Partner
Spoiler
Weekly Challenge 49 Alt Submission.png

 ...and here's another alternative with a hard-coded shortcut.  Only works insofar as 1-to-1 relationship between Product, Market and Type remains valid.

 

 

Alteryx Partner

Michael, I like the simplicity of your solution.  Any chance I could see the .yxmd?  I'm at dupton@decisionlab.net.  My solution (just posted) also works, but uses hard-coding based on observed values...

Director, Customer Enablement
Director, Customer Enablement

@DanielUpton, with our latest release of Community, you can now upload solutions right into the thread and no longer have to share just via spoilers! 

Alteryx Partner

@JoeM Okay, here is an alt solution.

 

 

Alteryx Certified Partner

I think my solution is the same as some others.

Spoiler
I separated the input into two streams by using the sample tool to select the first three rows, and skip the first three rows respectively.
I then used the Transpose and Crosstab tools to pivot the data into the correct format, using the first three rows as a reference file. This was then linked back on the header type:


Solution.PNG




 

 

Nebula
Nebula

very similar to all the others.    Seems that this may be the natural choice (given that so many folk arrived at this independantly)