Tableau is not a data-preparation tool. It's always better to have a clean file to start with. However, Tableau offers some simple transformation tools. When you connect to a dataset, you can, for example, use the Data Interpreter, split a column into multiple columns, or pivot your data. Let's see a case for these transformations.
For this section, I created a dataset to clean in Excel, as illustrated here:
If you want to reproduce the example, you can download the Dataset to clean file from my website, book.ladataviz.com section in the Chapter 4: Connect To Data and Simple Transformation section, or use this direct link: https://ladataviz.com/wp-content/uploads/2018/09/Dataset-to-clean.xlsx.
Three things are problematic with this dataset:
- There is a column header for the years
- The countries and...