2023: Week 38 - Solution



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




This challenge is a collaboration with the Workout Wednesday challenges so make sure you check out the Desktop challenge after completing the Prep stage.

Step 1 - Reshape Table

After inputting the table into our workflow, we first want to look at ensuring the SDG headings are in a single row with information about the colour indicator and the arrow.

To do this we need to utilise the Pivot functionality and also the ability to put more than one field within the values section. For this pivot we want to do a Columns to Rows and bring in all the SDG headers (without a 1) and then the SDG headers with a 1 into the second values section.


Note: you can add the second set of values by pressing the + in the top corner

After the pivot the table should look like this:



Step 2 - Update SDG Fields

We now want to update each of the SDG value & trend fields so that they are more meaningful than the colour or arrow.

First, we want to update the SDG value fields based on the requirements. We can do this by double clicking on a value within the Profile pane and renaming them individually.

The update values should look like this: 



Then we want to repeat the same for the Trend so the values look like this: 



Our table is then ready for the final output:



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 @LornaBrown@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