2021: Week 3

This week is the third in the Starter Challenges series we are running to kick off 2021.  

This challenge will introduce you to the two main types of reshaping data, pivoting and aggregation. We used aggregation last week so we are building on this technique this week. We will also let you work with Unions where we stack data sets that have similar structures on top of each other. 

As with all of our January 2021 challenges, we will be sharing useful links to helpful videos and articles that will give you more technical support if you need it. 

This week's challenge sees us looking at the Accessory Sales at our Bike Store.

Input

One Excel sheet with 5 tabs of data:
  • London
  • Leeds
  • York
  • Manchester
  • Birmingham

The structure of the data is the same in each worksheet. 

Requirements

  • Input the data source by pulling together all the tables (help)
  • Pivot 'New' columns and 'Existing' columns (help)
  • Split the former column headers to form: (help)
    • Customer Type
    • Product
  • Rename the measure created by the Pivot as 'Products Sold'
  • Create a Store column from the data
  • Remove any unnecessary data fields
  • Turn Date into Quarter (help)
  • Aggregate to form two separate outputs of the number of products sold by: (help)
    1. Product, Quarter
    2. Store, Customer Type, Product
  • Output each data set as a csv file (help)

Output

Product Quarter Output

3 Data Fields:
  • Product
  • Quarter
  • Products Sold
16 rows (17 rows including headers)

Customer Product Quarter Output

4 Data Fields:
  • Store
  • Customer Types
  • Product
  • Products Sold
40 rows (41 rows including headers)

Here's our full output for comparison. Remember we don't care about the order of the columns or rows as Tableau Desktop will import them in whatever order they come in!

After you finish the challenge make sure to fill in the participation tracker, then share your solution on Twitter using #PreppinData and tagging @Datajedininja@JennyMartinDS14 & @TomProwse1

You can also post your solution on the Tableau Forum where we have a Preppin' Data community page. Post your solutions and ask questions if you need any help!

Popular posts from this blog

2023: Week 1 The Data Source Bank

2023: Week 2 - International Bank Account Numbers

How to...Handle Free Text