2022: Week 33 - C&BSCo Next Sale

 Challenge by: Carl Allchin

This is the midpoint of our month of Intermediate challenges building on from the challenges in beginners' month. 

This week's challenge will again test your problem solving skills but I expect lots of different ways to achieve the same output (especially in different softwares). Remember to plan your path through the challenge to help you keep on task and not going off on tangents. 

We have collected the sales data for two stores and our online shop from the start of the year for a few weeks. We'd like to know how long between the orders of each of the types of products in the different locations. 

Input

There are 3 inputs this week:

Input 1 - Product Lookup

Input 2 - Instore Sales


Input 3 - Online Sales

Requirements

  • Input the data sets
  • Link the Instore and Online sales together to be one data source
    • Call the Nulls in the Stores field Online 
  • Link in the product Lookup to name the products instead of having their ID number
  • Create the 'Product Type' field by taking the first word of the product name
  • Create a data set from your work so far that includes the next sale after the one made in the SAME store of the same product type 
    • Requirement updated 20th Aug 2022
  • Workout how long it took between the original sale and the next sale in minutes
    • Remove any negative differences. These are sales that got refunded. 
  • Create a data set that shows the average of these values for each store and product type. Call this field 'Average mins to next sale' 
  • Output the results

Solution


3 fields:
  • Average mins to next sale
  • Product Type
  • Store
6 rows of data (7 including headers)

You can download the full output here

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