2023: Week 1 The Data Source Bank
Created by: Carl Allchin
Welcome to a New Year of Preppin' Data. These are weekly exercises to help you learn and develop data preparation skills. We publish the challenges on a Wednesday and share a solution the following Tuesday. You can take the challenges whenever you want and we love to see your solutions. With data preparation, there is never just one way to complete the tasks so sharing your solutions will help others learn too. Share on Twitter, LinkedIn, the Tableau Forums or wherever you want to too. Tag Jenny Martin, Tom Prowse or myself or just use the #PreppinData to share your solutions.
The challenges are designed for learning Tableau Prep but we have a broad community who complete the challenges in R, Python, SQL, DBT, EasyMorph and many other tools. We love seeing people learn new tools so feel free to use whatever tools you want to complete the challenges.
A New Year means we start afresh so January's challenges will be focused on beginners. We will use different techniques each week to help you develop your skills. In February, we will set the challenges at an intermediate level and then in March we will do some advanced challenges. January's challenges will have links to useful videos and blogposts to help you learn a technique if it is new to you.
The subject for January will be our new (fake) bank -- The Data Source Bank (DSB). This week we have had a report with a number of transactions that have not just our transactions but other banks' too. Can you help clean up the data?
Input
Requirements
- Input the data (help)
- Split the Transaction Code to extract the letters at the start of the transaction code. These identify the bank who processes the transaction (help)
- Rename the new field with the Bank code 'Bank'.
- Rename the values in the Online or In-person field, Online of the 1 values and In-Person for the 2 values.
- Change the date to be the day of the week (help)
- Different levels of detail are required in the outputs. You will need to sum up the values of the transactions in three ways (help):
- 1. Total Values of Transactions by each bank
- 2. Total Values by Bank, Day of the Week and Type of Transaction (Online or In-Person)
- 3. Total Values by Bank and Customer Code
- Output each data file (help)
Output
- Bank
- Value
- Bank
- Online or In-Person
- Transaction Date
- Value
- Bank
- Customer Code
- Value