2024: Week 21 - Loyalty Points Percentages

Challenge by: Alexandra Skelly

We're continuing with DS43's challenges so over to Alex to explain the her challenge. 

_____________________________________

At Preppin' Data we use a number of (mock) companies to look at the challenges they have with their data. We're going to focus on our own supermarket: SuperBytes. The shop has introduced a new loyalty card scheme. 

In the first task we need to clean up a number of data fields to determine the percentage of Free Byte qualifiers. Our stakeholders would like one dataset focused on the percentage of customers (split between male and females) that have qualified. 

Input

There is one input file:

Requirements

  • Input the data
  • Create the Loyalty Points:
    • For every £50 spent they get 1 loyalty point
    • Round Loyalty Points to 1 decimal place
  • Create a new field to categorise the Loyalty Points:
    • Points that are greater than or equal to 7 categorise them as "MegaByte" 
    • Points that are greater than or equal to 5 (but less than 7) categorise as “Byte”
    • Categorise the remaining as “No Byte”
  • Find the sum of customers that qualify for each type of byte category
    • For females and males separately
  • Pivot so that females and males have their own field 
  • Calculate the percentage of females and males in each category
    • Round the percentages to 1 decimal place
  • Output the data

Output

  • 3 fields
    • Category
    • Female
    • Male
  • 3 rows
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

2024: Week 1 - Prep Air's Flow Card

2023: Week 2 - International Bank Account Numbers