2023: Week 52 - Solution


Solution by Tom Prowse and you can download the workflow here.



Step 1 - Split Themes

First we want to split out the themes so that each of them are on a separate row. First, we want to split them apart into separate fields by using the custom split functionality:


We can then remove the original field and use a columns to rows pivot to bring each of the different themes into a single column. Within the pivot we can use the wildcard pivot with a '-' to bring all of the theme fields in.



This will create some blank values and we can remove these from our table that should look like this: 



Step 2 - Grouping & Reshaping

Next we want to group some of the themes together that are similar. We can do this with manual selection by selecting multiple in the profile pane and then pressing 'Group Values'. 

As a result of the grouping we should have 73 values (roughly). 



After the grouping we want to total up the number of challenges in each Theme and Level. Within the aggregate step we group by Themes Split and Level, then Sum the Number of Rows.


These fields can be renamed to Technique and Number of Challenges.

We can now pivot the data to transform the shape so that we have a column for each level. This will allow us to count how many challenges in each level.

Here we use a Rows to Columns pivot where we group by level and aggregate by number of challenges: 




Then finally we want to create a total field: 

Total
ZN([3-in-1]) + ZN([Beginner]) + ZN([Intermediate]) + ZN([Advanced])

The ZNs will ensure that the null values become 0.

Then we can create a priority order to show which topics should be prioritised in new challenges:

Priority


The final output should look like this: 


You can download the output from 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