2022: Week 18 - Solution
Solution by Tom Prowse and you can download the workflow here . This week's challenge is focussed on cleaning a pivot table that has a lot of fields (145!!). Although this might be good to look at in a Spreadsheet, it's not the best way of structuring our data in Tableau so let's look at how we can 'un-pivot' our data. Step 1 - Rename Fields First up we want to dynamically rename our fields so that there is a common separator between the Bike Type, Date, and Measure. Now this could be a long manual task as there are 145 fields so it would take a seriously long time for us to go through each one. Luckily, Tableau Prep has a feature that allows us to rename our fields all in one go! Using the 'Rename Fields' feature we can replace the '___' with a single '-': This allows us to create the replace the separator between the Type and Date. We can then repeat this process by replacing '_' with ' ' (space): At this stage our fields...