Tableau
Last updated
Tableau is a Data Visualisation tool that is widely used for Business Intelligence but is not limited to it. It helps create interactive graphs and charts in the form of dashboards and worksheets to gain business insights. And all of this is made possible with gestures as simple as drag and drop!
You don’t need to know much to use Tableau, but still, a basic awareness of all the types of graphs such as bar graph, line charts, histograms, etc is preferred.
Along with that, it will be beneficial if you possessed some basic understanding of database management ( datatypes, joins, drill down, drill up, etc ) too. Even if you don’t, not a reason to worry since I will be covering all such concepts in this and forthcoming articles.
To work on Tableau, you need Tableau, right?
Out of the five above mentioned products, Tableau Desktop, Public and Online offer Data Visual Creation.
Tableau Desktop
It is available in the following three formats :
2. If you are a student or a teacher, you get free access to the Desktop for a full year.
Tableau Public
Tableau Public is purely free of all costs and does not require any license. But it comes with a limitation that all of your data and workbooks are made public to all Tableau users.
Tableau Online
Tableau Online is the best option for you, if you wish to make your Workbooks on the Cloud and be able to access them from anywhere.
Now that you have the suitable product installed and set up, I am pretty sure that your hands must be tingling with anticipation to finally begin visualizing using Tableau! Well let’s not keep you waiting then, go ahead and launch the tool.
You should see a screen similar to the one above. This is where you import your data. As is visible, there are multiple formats that your data can be in. It can be in a flat-file such as Excel, CSV or you can directly load it from data servers too.
You can see that Tableau itself offers some Sample Workbooks, with pre-drawn charts, graphs, and other visuals. I would suggest going through these later for further exploration.
The best way to learn is to get your hands dirty. Let us start with our Data, which can be found here. The data is that of a United States’ Superstore which is deliberating over its expansion. It wishes to know the prospective regions of the country where it could and hence requires your help.
The first thing that you will obviously need to do is import the data onto Tableau. So quickly follow the below steps:
1. Since the data is in an Excel File, click on Excel and choose the Sample – Superstore.xls file to get :
Uh oh, the imported data looks a bit different for the first few rows. Don’t worry, the solution lies right ahead.
Data Interpreter
3. You see the option of Use Data Interpreter? Click on it to get the following clean view :
All that messy data magically disappeared!
If you open the Excel data file, you will see some metadata in it, i.e. information about data :
Tableau imports the entire data file as is, but anticipating such discrepancies, explicitly provides a solution in the form of a Data Interpreter. If you wish to view the exact changes that it made, click on Review the results, and choose the Orders tab in the opened Excel sheet.
As it will show, it simply removed the erroneous data.
Don’t get overwhelmed by the various elements that you see here, we will cover them all one by one.
Visualization in Tableau is possible through dragging and dropping Measures and Dimensions onto these different Shelves.
Rows and Columns : Represent the x and y-axis of your graphs / charts. Filter: Filters help you view a strained version of your data. For example, instead of seeing the combined Sales of all the Categories, you can look at a specific one, such as just Furniture. Pages: Pages work on the same principle as Filters, with the difference that you can actually see the changes as you shift between the Paged values. Remember that Rosling chart? You can easily make one of your own using Pages. Marks: The Marks property is used to control the mark types of your data. You may choose to represent your data using different shapes, sizes or text.
And finally, there is Show Me, the brain of Tableau!
When you drag and drop fields onto the visualization area, Tableau makes default graphs for you, as we shall see soon, but you can change these by referring to the Show Me option.
Note: Not every graph can be made with any combination of Dimensions or Measures. Each graph has its own conditions for the number and types of fields that can be used, which we shall discuss next.
So far we have pretty much covered the requisite theoretical knowledge. Lets finally begin with some visualizations now.
From what can be observed, the net sales are on the rise, but the Profit is creeping up slowly. We can also quite clearly see the peak Sales Months, which could be attributed to various reasons. We can only know more as we explore more.
Before we start, there is one thing that I would like to recommend and that is you name your Worksheets as being done here. Since I will be referencing them back and forth throughout the article, it will be easier for you to follow.
Let’s begin with the simplest visualization, and that is displaying the Net Statistics numbers. Tableau, being as smart as it is, automatically computes such values under Measure Names and Measure Values. Follow these steps to make what is called a Text Table :
1. Drag Measure Names from Dimensions onto the central empty area so that you see a Text Table.
2. Measure Names will be displayed automatically onto Rows, so drag it from Rows to Columns.
3. Since we don’t really need Measures like the Row ID, Discount, etc, you can drag them off from below the Marks Pane, to get something like this :
Note: Don’t get confused by the different colors of the fields that you see. Just remember one small trick: Blue means Discrete and Green, Continuous.
So we have the net Sales and Profit values, let’s delve a little deeper by getting the Sales and Profit Values over the years. Let’s make another, but a more detailed, Text Table :
1. Drag Order Date from Dimensions and Sales from Measures to Rows.
2. Right-click on the green Sales Pill, and select Discrete, in place of Continuous, since we want the explicit values and not the bar graphs.
3.
Finally, drag Profit on the ‘abc’ column to get
We have just covered the numeric part of the Dashboard, but that is not its selling point. It’s the Line Charts. Lets quickly learn how to make one :
1-To create the chart of Sales and Profit Growth, drag Order Date over the Columns, Sales over Rows and then Profit over the formed Sales axis – so that you see an equals sign – to get the following
If you were to click on Show Me, you will see the different types of Line Charts that you can make, and if you were to hover over each of them, you will get to see their Dimension and Measure requirements too. In case you ever feel lost, I recommend referring to Show Me.
With the previous visualizations, we had gotten a brief overview of the Superstore. Let’s dig a little deeper now. The next thing that I can think of exploring is the demographic of the Sales and Profit. What are the States that have the highest Sales Revenue, which ones are generating the maximum Profits:
Before discussing the inferences, let’s first create the Pie Chart of Region Sales :
1. Drag Regions onto Rows and Sales onto Columns.
2. Go to Show Me, and select the Pie Chart.
3. And finally, drag Sales over the Label in the Marks Pane to get :
From the visual, it’s pretty evident that the two opposite ends, East and West are leading in the Sales game. Let’s dissect this a bit more.
Note : Whenever you have some geographical data, it is always advisable to plot and see it on a Map to gain better insights.
So, we are now going to make the Map Chart of State Sales Distribution :
1. Since its the States that we wish to analyze, drag States onto the empty area, so that you automatically see a Map, with small Circles. Follow this step by dragging Profits next. You will notice the size of these circles changing to represent the varying values of Profits. This is called a Symbol Map. But we are going to convert this into a Filled one, by going to Show Me, and selecting the Filled Map.
2. Drag Profits again, but this time onto Label in the Marks Pane, to view the Profit Values mapped as well, like so :
California and New York are the top most sellers from the West and East region, but unfortunately, there are other states such as Texas, Colorado which even after having good Sales, have negative Profits! This is certainly not good news for the Superstore. You can perceive a good analysis for the other States as well.
And lastly, here are the steps for making the Scatter Plot of Sales and Profit Analysis :
1. Drag Sales onto Rows, and Profit onto Columns. You will see one tiny circle, which actually represents the Total Sales and Profit Values.
2. To get more information, drag States onto the graph created, so that these circles/bubbles scatter to represent the individual States.
3. To better understand the central tendency of the data, we have also added a Median axis as Reference Line. This can be easily done by right-clicking on the Sales / Profit Axis – > Adding Reference Line and choosing Median over the default Average Reference.
4. Finally, for some more insight, drag States again, but this time onto Label in the Marks Pane, and get:
The findings from the Map chart become more prominent with the following Scatter plot inferences :
The states in the top right, with high Sales and high Profits, mean good business for the organization.
States with positive Sales and Profits, but near the two respective axis are the ones where there is some scope of improvement.
Whereas the states that belong to the 2nd or 3rd quarter are the ones which are not generating much revenue.
One of the great things about Tableau is that it lets you interact with the visuals. Have a look at an example
When we clicked on the Central Region, it highlighted and showed the Central States of the US, along with their respective Sales and Profit scatter. Here we used the chart as a Filter itself which is a feature of a Dashboard. We shall learn how to make one at a later stage.
There is one pretty important analysis that we have yet to touch, and that is Product Statistics. High Sales could be easily attributed to the high cost of the products being sold. Also, when you are considering expansion, you will want to know the Sales distribution of the Products too:
Here we have visualized not just the Sales but also the Profits.
Its quite surprising to see Categories that have high Sales, generating negative profits, like Technology in November 2015, or Furniture in October 2016 and this is inferred from the first chart, which is also called a Highlight Table. As the name suggests, it highlights the relative proportion of the Measure Values of our data. So let’s learn how to make one :
1. Drag Category and Order Date ( Year ) in Rows.
2. Drag Order Date (Month ) over Columns, and Sales over the empty ‘abc’ fields
3. Select Highlight Table from Show Me, and drag Order Date ( Year ) back to Rows, in case it got re-shuffled.
4. Finally drag Profits over Colour in the Marks Pane, to get :
The Product Sub Category Sales is a Bar Chart, which is also quite easy to make :
1. Just drag Sub – Category over to the Rows
2. Drag Profit onto the Columns.
3. Go to Show Me and choose the Horizontal Bars
4. For some customization, drag Sales over Colour in the Marks Pane to attain this final visualization:
From the above graph, we are getting a good idea of the Net Sales and Profit margins of the various products. Notice that even though Tables’ Sales are quite high on the scale, it’s the only product with the least profit.
Now, just like before, consider interaction with the visualization:
We are now able to view each Category’s Products’ Sales and Profits, at a low-level granularity of Year and Month!
Congratulations! You have now covered one of the important aspects of Tableau! But it’s not the end of your learning just yet. Tableau offers some advanced functionalities too, some of which we will cover next :
Till now we have only made simple charts, that actually provide cumulative data, which is combined data over the lifetime of the Superstore. To look at Sales of a particular Year, a Month, for a certain Product, or to basically view the distinct aspects of the data, Filters are the way to go.
Let’s head back to the first-ever Chart that we had made, of Peak Sales and Profit Months :
The visual here is an accumulation of all 4 years of data, for all Regions, States, Categories and Sub Categories.
The steps of turning any Dimension into a Filter are the same. Let’s first experiment with the Order Date ( formatted to Year ) :
1-Drag the Dimension to the Filters’ Shelf, to see the following pop up. Here we will be choosing
2-Choose the values that you want to be a part of your Filter
3-Right-click on the newly generated Filter, and then choose Show Filter
4-You can also change the format of your Filter, for example, whether you wish for a Dropdown list, a Slider, a Single Value List, etc
By now you must have gotten some picture of the way our Data is built. We have Category as the main Field, divided into Sub – Category, which is further distinguished into the various Product IDs and their corresponding Product Names.
This concept of breaking down our data to reach the absolute depth is called Drilling Down :
Similarly, you can drill down from Order Date to Order ID to Ship Date to Ship Mode. This is also referred to as making a Hierarchy of data.
Let’s consider the ProductDrillDown first, which is really a Bar Graph :
1. First, you need to group the Dimensions you want in a single Hierarchy. So, drag Sub – Category from Dimensions on top of Category in the Dimensions itself, and change the Name of the hierarchy to Product.
2. Now drag Product ID and Product Name over this Product Hierarchy
3. Do the same for Order Hierarchy to get :
4. To finally plot your data, drag the Product Hierarchy onto Rows and Sales onto Columns, and get:
This was just a simple Bar Graph, but if you hover over the Category axis, you will see a small plus sign. Click on it to get a granulated version of your data. Do the same for the other generated axis as well to get to the absolute depth.
The Tree Analysis of Product Sales is a TreeMap, which is a great way of representing Drilled Down data, and is quite easy to make :
5. Following the drill down from Step 4, simply go to Show Me and select the TreeMap chart, to get the following :
So far you have analyzed the present scenario, but for expansion consideration, let’s try and analyze the future too.
With the following Dashboard, you can not only see the Trends over the Sales Months, but also a Forecast over the Years too. And both of them tell a different story altogether :
Although the Sales of the Superstore are increasing over the months of a year, the future, in general, looks a bit bleak. The sales seem to become constant for the next 3 years, but fortunately for the Superstore, the Profit is increasing steadily. Let’s get to making the above now.
Traverse back to the Peak Sales and Profit Month Chart and follow these steps to make a Trend Line of your own :
1. Go to Show Me and choose the Dual Combination chart, to get this chart :
2. To get the Trend Line, go to Analytics, and simply drag Trend Line over the chart, to get :
For forecasting, we are going to deal with the Sales and Profit Growth chart. The construction is similar to that of Trend Lines, but with a small change. The steps are :
1. Drag Forecast over the chart.
2. You can also change the time frame of the Forecast, by right-clicking on the Forecast Area and opting for Forecast Options, after which you can make your customizations:
Let’s head back to the Sales and Profit Analysis chart that we had made. Remember the detailed inference that we had generated from it? We are just going to make that a bit more prominent now, using Clusters. To make them :
1. Go to Analytics and choose Clusters.
3. To view the Cluster information, right-click on Clusters in the Marks Pane, and select Describe Clusters, to get this pop up :
I am sure by now you must have gotten a pretty good idea of what a Dashboard is, having seen it plenty of times all throughout this article.
If not, well then a Dashboard is simply a means of combining Worksheets together so that they convey some message. Without much further ado, let’s get right to it!
Consider the State Sales Distribution Map chart and Product Sub Categories.
What if you wanted to know the various Sales margin of each Product within separate States? We had observed that Texas was one of the States with the lowest Profits. By looking at the following Dashboard, you will see that the reason is it’s not managing to generate Profits in majority of the Products :
Now consider the state-wise Sales distribution of a Sub – Category :
The above beautifully shows the distribution of Appliances over the country, where California seems to be the major Profit contributor.
Making such a Dashboard is actually quite easy. Let’s see how :
1-This time instead of creating a New Worksheet, we are going to create a new Dashboard. Click on the window like icon next to the ‘New Worksheet’ icon in the bottom panel to get the following
2. See the multiple Worksheets that we had made till now over on the left? All that we have to do to make a Dashboard is drag these sheets from the pane to the empty area ‘Drop sheets here’.
3. So to make the previously displayed Dashboard, simply drag State Sales Distribution and Product Sub Category Sales. The Dashboard will automatically make space available for both of them.
Note : Even after the creation of the Dashboards, you can still edit your Worksheets, and the same changes shall be reflected here.
If you were to click on the States or the Products after creating your first ever Dashboard, you won’t observe any change. Because for such visuals, we first have to convert the Charts themselves into filters.
4. Simply click on the small Down Arrow on each chart you wish to turn into a Filter, and select Use as Filter:
Note: While making Dashboards, it is preferred to use your charts as Filters, rather than cluttering up the view with custom ones.
Just like Dashboards were a way to combine the Worksheets, a Story is where you combine all the dashboards, and if need be individual Sheets as well, to convey, as the name suggests – a Story.
1. Just like before, you simply drag your Worksheets and Dashboards onto the empty space :
So let’s combine all those Dashboards that we had made into what could perhaps make a decent presentation for a beginner. Do ensure to Add a Caption to all of your Dashboards, to convey your message clearly :
If you have ever come across Tableau Stories online, the ones which you could actually interact with, instead of just viewing, that is made possible by publishing your Workbooks onto the Tableau Server.
If you have one set up, then all you need to do, after creating your Stories, is go to Server -> Publish Workbook and enter the Server Name :
What we have covered so far is pretty much the basics of Tableau. It has various other features which I will be covering in my forthcoming articles.
As it is said ‘With practice, comes perfection’, it is suggested that you experiment as much as you can with Tableau.
Below is a sample Dashboard that I would encourage every one of you to try and make. You will not only get to test the skills that you have learned so far but also hopefully acquire more. The dataset used is the same as the one we had been working with so far :
2. You can see three sheets on the screen, but we are only going to be dealing with Orders here, so go ahead and drag the same on Drag sheets here
As soon as you had imported your dataset, next to the Data Source tab near the bottom of the screen, you immediately must have seen Go to Worksheet. A Worksheet is where you make all of your graphs, so click on that tab to reach the following screen
Let’s start with Dimensions and Measures
I personally prefer to start from the shallow side of the pool, slowly swimming towards the deeper end. So I would suggest beginning by getting an overview of the Superstore Sales and Profit Statistics. That would include the Net Sales, the Net Profit and the growth of the two measures, to name a few. Here is a gist of what we will be making
5. Do the same thing for Monthly Sales and Profit Values, but this time changes the format of Order Date, from Year to Month, by right-clicking on Order Date in the Rows, and choosing Month, to get something like this
2. Repeat the same to find the Peak Sales and Profit Months, but again change the format of Order Date, from Year to Month, and get
Years
5-If you feel that some of your filters can be applied to other sheets as well, then rather than repeating the steps, you can simply Apply the Filter to all other relevant Worksheets
2. You can format the Cluster formation as per your wishes. Here we are clustering based on the Sum of Sales and Profit, choosing the number of clusters to be 4