2021: Week 42 Charity fundraising

 Challenge by: Carl Allchin

This week we are going to use one of the newer features in Tableau Prep, New Rows. New Rows was released in Prep Builder version 2021.3 so you will need that version or later of Prep for this challenge (unless you want to scaffold your data yourself). 

To date, Tableau Prep has assessed each row of data separately but we all know data can often be incomplete and that made for some tough challenges. With the New Rows step within Prep Builder this should make working with incomplete data sets much easier (and in some cases possible where it wasn't before). 

If you want to learn more about the New Rows step and how to use it, have a look at this 'How to...' post on our new site: https://www.preppindata.com/howto/how-to-create-new-rows

This challenge isn't just for Prep users. Jenny, Tom and I love to see solutions on all different types of software and in different languages so please feel free to use whatever you want to as it helps everyone learn what options they have. 

The Challenge

Allchains Bike Stores have been fund raising in one of their stores. Customers are given the option of donating to charity when they buy a new bike. Sadly, the team haven't been recording the data accurately and the donations only get totalled up at sporadic points throughout the month. 

We need to understand roughly how much is being raised each day. Also, are our customers more generous on a certain day of the week?

Here is the data set that's been captured by our team:

Requirements

  • Input the data
      • Create new rows for any date missing between the first and last date in the data set provided
  • Calculate how many days of fundraising there has been by the date in each row (1st Jan would be 0)
  • Calculate the amount raised per day of fundraising for each row
  • Workout the weekday for each date
  • Average the amount raised per day of fundraising for each weekday
  • Output the data

Output


One file.

5 data fields:
  • Date
  • Total Raised to Date
  • Days into fund raising
  • Value raised per day
  • Average raised per weekday
30 rows (31 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

2023: Week 1 The Data Source Bank

2023: Week 2 - International Bank Account Numbers

How to...Handle Free Text