Posts

2023: Week 21 - Solution

Image
Solution by Tom Prowse and you can download the workflow here .  We are revisiting The Prep School for the challenge this week and are looking at if the students grades are improving between years. Step 1 - Reshape Data First we want to get the grades in separate columns for each of the years so that we can compare them on a single row.  We can reshape the table by using a Columns to Rows pivot where we can utilise the wildcard pivot to first bring in all the 2021 fields, then we can use the + button to add a second pivot with all the 2022 fields:  We have renamed the fields so that it's easier to identify which grades are which. We can also remove the year from the Category field by using a custom split on the '-' and returning the 'last' section:  After this the table should look like this:  Step 2 - Average Grade We are now in a position to calculate the average grade for each student in both years. We can calculate this using an aggregation step where we gro...

2023: Week 21- Prep School Grades

Image
 Created by: Habeeb Gayle This is our next challenge from one of the members of the 38th cohort of the Data School UK.  The Prep School is interested in monitoring the progress of their students. They are specifically trying to find students whose report grades have declined from 2021 to 2022. Each student’s report card has 4 categories when grading: attainment, attendance, effort, and behaviour. Input The report card grades of students from 2021 and 2022. Each category is on a scale of 1-9; with 9 being the best grade. Requirements Input the data   Reshape the data so that each student has 4 rows each, with grades for 2021 and 2022 being in separate fields  Calculate the average grade for each year for each student Calculate the difference between the average grade of each student from 2021 to 2022 Categorize each student into the following 3: Improvement (>0) No change (=0) Cause for concern (<0) Filter out the data to leave only students with a ‘cause for co...

2023: Week 20 - Solution

Image
Solution by Tom Prowse and you can download the workflow here .  This week's challenge comes from  Trea McElhone  and we are looking at food options at our school dining hall. Step 1 - Group Meal Types First we want to input our Meal Nutritional Info table where we can group the meal types into different types of food (Meat-based, Vegan, Vegetarian).  To do this we can make use of Tableau Prep's grouping features by using the set group by pronunciation or manually group the fields as there aren't too many to group.  If we are manually grouping then all we need to do is select the given fields in the profile pane and then right-click --> group values  Step 2 - Combine Tables We can now input the 2nd table that contains details about the Meal Prices. We can join the table with our existing workflow by using an inner join on the Meal Option field.  After removing the irrelevant fields our table should look like this:  Step 3 - % of Total Final par...

2023: Week 20 - Dining Hall Debacle

Image
Created by: Trea McElhone At the Prep School, the lunch menu is extensive.  However at the latest PTA (Parent Teacher Association) meeting some parents were grumbling about the range of dietary preferences offered by the school’s dining hall menu.  They seemed to suggest that there aren’t enough vegetarian or vegan options for their kids, and they also complained that the vegan & vegetarian options offered are more expensive than the meat-based options.  The principal was quick to reassure them that this was not the case - however perhaps too quick, as they had yet to check the stats!  This is where you come in, as the PTA insisted on getting some fact based info and they want it pretty soon. As such, in this week's challenge, your task is to help the Prep School understand what percentage of meal options on its menu are vegan, vegetarian , or meat-based, as well as the average price for each meal type. Input Input 1: Meal Prices Input 2: Nutritional Information ...

2023: Week 19 - Solution

Image
Solution by Tom Prowse and you can download the workflow here .  This week was a Tableau Conference special! This was the first time that Jenny & Carl were able to get lots of other preppers into a room at TC and work through a Preppin' Data challenge all together. The challenge has three parts, each with increasing levels of difficulty so let's look at how we can solve them.  Challenge 1 - Beginner Level Step 1 - Split Description First we want to input the Session Description table and from here we can split out the Speaker Name and Presentation Description from the Description field. To do this we want to split the Description field using a ':' as a separator. This will split the field into two fields - before the ':' is the presenter and after the ':' is the description.  We can then rename the fields and remove the Description field so the table looks like this:  Step 2 - Create Initials We can now extract the first letter of each name by splitt...

2023: Week 19 - TC Special

Image
Challenge By: Carl Allchin Welcome to the Tableau Conference Special for Preppin' Data. If it's your first time here then a very walk welcome to you! This week we have something pretty special planned for you with a 3 part challenge. The output for each part will flow through to the next part, allowing you to build to answer the ultimate question: Who is the person your boss has tasked you with finding and where are they?! The only information your boss has given you is that they're presenting about data deduplication on the 2nd floor. The rest is up to you! Beginner Level Input The input for this challenge contains all the information about sessions. The presenter name, the subject and a detailed description are all squeezed into one field that we'll need to parse out. Requirements Hint: String functions will be super useful for this challenge, learn more about them here Input the data Split out the Description field into Speaker Name and Presentation Description Creat...

2023: Week 18 - Solution

Image
Solution by Tom Prowse and you can download the workflow here .  This week's challenge takes us back to the fundamental steps within Tableau Prep - Input, Clean, Pivot, Aggregate, and Output. These are the most common steps used within Tableau Prep and are all vital when preparing data. Step 1 - Location Names After connecting to the 'Messy Nut House Data' as a text file we can drag in the single sheet as our input. Then we create a new clean step where we can tidy the spelling mistakes within the Location field.  To do this we can use some of the clever group features within Tableau Prep to group values by Spelling or Pronunciation. From here we can manually rename the fields so that we have three cities - Liverpool, London, and Manchester.  Step 2 - Reshape the Table Next we want to reshape the table so that each of the Categories become a field name. To do this we want to pivot the data using a Rows to Columns pivot where we group by Category and Sum the Value field. A...