2022: Week 28 C&BSCo - No sales today

Created by: Carl Allchin

One of the hardest challenges with data preparation is recording something that doesn't happen. There are some neat tricks and techniques to do exactly this so here's your chance to practice. 

Chin & Beard Suds Co. (C&BSCo) is trying to find how many days none of their stores actually sold any products. Thankfully for C&BSCo there aren't too many but the management team want to know which day of the week the non-sales days most commonly happen on. 

If you are newer to data preparation, you might find the following links helpful:

Input

The same input file as last week:

Requirements

  • Input the file (download here)
  • Convert any data types required (nb. certain Steps in Prep Builder can only utilise limited data types)
  • Create a new row for each day that doesn't have a sale
  • Remove any date record where a sale occurred 
  • Create a column for Day of the Week
  • For each day of the week, count the numbers of dates where there were no sales
  • Rename the count field as Number of Days
  • Output the data

Output


2 data fields:
  • Day of the Week
  • Number of Days
7 rows (8 rows incl. 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

2024: Week 1 - Prep Air's Flow Card

2023: Week 1 The Data Source Bank

How to...Handle Free Text