On day 3 of The Data School we were plunged into the world of data cleaning. At first going through the theory, there was a lot to remember and imagining how to make our dirty data clean could get a little confusing. However, as soon as we started putting it into practice in Tableau Prep, everything became clear. However, one step that wasn't as clear to me was how to union multiple tables (that are in the same file) at the input stage! Let me show you how!
But first, what is a union? A union joins two or more data sources together. To do a union all of the data fields must be the same. It basically just stacks the second source onto the bottom of the first source; this repeats for further sources.
For this example I will be using data from Preppin' Data 2021 W4.
To start with we drag one of the tables to the flow pane (the blank white space).Then go to the 'tables' tab and select 'Union Multiple Tables'.

As shown below, we have now selected all the tables in the file to union. However, I only want to union the tables of the cities, not the 'Targets' table. So how do we remove this?

Go to Add Worksheet Filter and select Worksheet Name. In the dropdown field put 'doesn't match' and then type in the worksheet you want to exclude, in this case 'Targets'. Once applied, Tableau Prep highlights the tables included on the side and in the list of included tables. And now you're good to go start cleaning!
