One powerful capability of Tableau is the ability to join various data sources.
Think of joins in Tableau as the joins in SQL that you learned about. The major difference between the two is that Tableau allows you to perform joints graphically and figures out the common columns on its own. Let’s take a quick look at a demonstration of joining data sources.
As you saw in the video, Tableau can find common columns on its own when you drag the tables that you want to connect. You do not need to write code as you did in SQL. However, you need to be careful about the columns that are being connected. If there are columns that do not have similar spellings, Tableau will not be able to connect the tables; you will need to connect them manually.
Once a table join is successfully performed, all the variables will appear on the left side of the data plane. The demonstration in the next video will show the changes in the data plane after joins are performed.
In this segment, you learned about two important functionalities in Tableau: joins and splits. In the next segment, you will learn about combining various plots together.
In this video, the variables that you added after performing joins are all listed on the left side of the worksheet and are available for all worksheets.
Now recall the join commands that you performed in SQL, including inner and outer joins. Tableau also allows you to join variables under different conditions. The following article will give you information on performing left-right inner and outer joins.
Instructions to perform various joins in Tableau
It is recommended that you visit this link and try joining tables under a specific condition.
In addition to joins, an important task that data analysts sometimes need to perform is splitting data.
Consider the data given below.
Measurement date*Station code*Item code*Average value*Instrument status 2017-01-01 00:00*101*1*0.004*0 2017-01-01 00:00*101*3*0.059000000000000004*0 2017-01-01 00:00*101*5*1.2*0 2017-01-01 00:00*101*6*0.002*0
It looks like the first row of the data consists of the columns, and all the subsequent rows are the individual readings in the table. If you carefully notice, individual values are separated by a star. Although in its current state, the data looks quite unstructured, if you consider each star as an indicator of a new column, you will quickly realize that the data is, in fact, in the same column format that Tableau expects it to be; you just need to separate each row using the star mark to indicate a new column. This kind of separating of data using a specific indicator is called splitting. It is commonly performed in Excel files, but Tableau also has an inbuilt ability to split data.
As a data analyst working in a company, it is highly unlikely that you will be expected to transform the data into a well-structured form. Usually, there will be a data engineering team to help you set up all the necessary data connections in Tableau; nonetheless, it is important to know the split function. The article linked below will give you all the necessary information about splitting data in Tableau.
Instructions to use the split function in Tableau.
Complete the exercises given below by performing appropriate joins.