This week we revisit one of Jenny's favourite TV shows, Richard Osman's House of Games, and look at if the results would be different if we changed the double points scoring system.
Step 1 - Keep Relevant Fields
The first step after inputting the data is to only keep the relevant fields that are shown in the requirements. We can do this straight from the input step by using the tick boxes to select only the fields that we require and double clicking to rename any fields:
Step 2 - Filter
Next we want to filter all of the rows where the Series has a null value or is preceded by a 'N'. First we can select the Null, N1, & N2 values in the profile pane and then exclude these values. We should now have the numbers 1-5 remaining.
We can also tidy the Rank field at this stage by removing any letters. We can use Tableau Prep's cleaning functionality to help us with this:
Step 3 - Points with Double Points
The next step is to calculate the new final points if the double points Friday didn't occur. Based on the scoring system we can use this calculation:
Points without Double Points Friday
[1st]*4
+
[2nd]*3
+
[3rd]*2
+
[4th]
Then we can create a new rank based on this calculation to see who has the highest points:
Rank without Double Points Friday
Then we can calculate if there was any change in the winner:
Change in Winner? IF [Rank]=1 THEN [Rank without double points Friday]!=[Rank] END
Then finally we need to identify if there was a change or not for each Series and Week combination:
Change in winner with no double points Friday
{ FIXED [Series],[Week] : max([Change in winner?]) }
At this stage our table should look like this:
Step 4 - Double Score Friday
Next we want to calculate the scenario if the score was doubled on Friday and not just the points. First, we need to calculate the score:
Score if Double Score Friday
[M]+[Tu]+[W]+[Th]+([F]*2)
Then we can rank these new scores:
Rank if Double Score Friday
Then again we can calculate whether there has been a change in the winner:
Change in Winner?
IF [Rank]=1 THEN
[Rank if Double Score Friday]!=[Rank]
END
And then we can calculate this over the whole week and series combination:
Change in winner if Double Score Friday? { FIXED [Series],[Week] : max([Change in winner?]) }
After these set of calculations we need to remove any unrequired fields and we are ready to output the data:
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!
Challenge by: Jenny Martin As I've mentioned before in a previous challenge, I'm a big fan of a quiz show called Richard Osman's House of Games. However, I've often found the way that they decide the overall winner of the week a little troubling. Each day the player who has scored the most, will receive 4 points, 2nd place will receive 3 points, 3rd place will receive 2 points and last place will receive one point. These points will be added up across the week to determine the overall winner, but with a twist! Each Friday double points are awarded so 1st place receives 8 points and so on. This leads me to wondering: Would there be a different winner if there was no double points Friday? What about if participants weren't ranked at the end of each day and they had a running total score across the week instead, would that lead to a different winner? What about doubling the scores on the Friday, instead of the points awarded? Input Luckily I didn't have to collect ...
Free isn't always a good thing. In data, Free text is the example to state when proving that statements correct. However, lots of benefit can be gained from understanding data that has been entered in Free Text fields. What do we mean by Free Text? Free Text is the string based data that comes from allowing people to type answers in to systems and forms. The resulting data is normally stored within one column, with one answer per cell. As Free Text means the answer could be anything, this is what you get - absolutely anything. From expletives to slang, the words you will find in the data may be a challenge to interpret but the text is the closest way to collect the voice of your customer / employee. The Free Text field is likely to contain long, rambling sentences that can simply be analysed. If you count these fields, you are likely to have one of each entry each. Therefore, simply counting the entries will not provide anything meaningful to your analysis. The value is in ...
Created by: Carl Allchin Welcome to a New Year of Preppin' Data challenges. For anyone new to the challenges then let us give you an overview how the weekly challenge works. Each Wednesday the Preppin' crew (Jenny, myself or a guest contributor) drop a data set(s) that requires some reshaping and/or cleaning to get it ready for analysis. You can use any tool or language you want to do the reshaping (we build the challenges in Tableau Prep but love seeing different tools being learnt / tried). Share your solution on LinkedIn, Twitter/X, GitHub or the Tableau Forums Fill out our tracker so you can monitor your progress and involvement The following Tuesday we will post a written solution in Tableau Prep (thanks Tom) and a video walkthrough too (thanks Jenny) As with each January for the last few years, we'll set a number of challenges aimed at beginners. This is a great way to learn a number of fundamental data preparation skills or a chance to learn a new tool — New Year...