2021: Week 21 Getting Trolleyed

 Challenge by: Carl Allchin

Our final challenge for calculations month is all about the Analytical Calculations in Tableau Prep, Level of Detail calculations and Rankings. These calculations let you answer the questions your stakeholders have before you've even visualised anything. Sometimes all we need is the answer. If you're not using Prep for this challenge, I have hopefully made a challenge you can replicate too (you might just need to use a join). 

Challenge

With the Prep Air - New Trolley Inventory project finally delivered at the end of May, we want to analyse what are the products that we are now selling for a much higher amount than we did before the project. We want to analyse the top three products based on price rise per destination. 

Input

One spreadsheet with 10 sheets, one sheet per month (Jan is month 1, Feb is month 2 etc)

Requirements

  • Input data
  • Bring all the sheets together
  • Use the Day of Month and Table Names (sheet name in other tools) to form a date field for the purchase called 'Date'
  • Create 'New Trolley Inventory?' field to show whether the purchase was made on or after 1st June 2021 (the first date with the revised inventory after the project closed)
  • Remove lots of the detail of the product name:
    • Only return any names before the '-' (hyphen)
    • If a product doesn't have a hyphen return the full product name
  • Make price a numeric field
  • Work out the average selling price per product
  • Workout the Variance (difference) between the selling price and the average selling price
  • Rank the Variances (1 being the largest positive variance) per destination and whether the product was sold before or after the new trolley inventory project delivery
  • Return only ranks 1-5 
  • Output the data

Output

We want to know which two products appeared more than once in the rankings and whether they were sold before or after the project delivery. Tweet us your answer!


One file:
11 fields:
  • New Trolley Inventory
  • Variance Rank by Destination (remember this also factors in the pre / post project delivery)
  • Variance 
  • Average Price per Product
  • Date
  • Product
  • First name
  • Last Name
  • Email
  • Price
  • Destination

50 rows (51 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

2024: Week 1 - Prep Air's Flow Card

2023: Week 1 The Data Source Bank

How to...Handle Free Text