top of page
hand-businesswoman-touching-hand-artificial-intelligence-meaning-technology-connection-go-

Basic bar charts in Tableau

In this article we will look at how to create basic bar charts in tableau. We will take a look at three basic bar charts - Vertical, Horizontal and Stacked.

To understanding the creation of bar charts, we need to understand the difference between rows and columns in Tableau canvas. When you place a data point in rows, that data point gets displayed vertically and the data point that is placed in columns is displayed horizontally.



The green pills in Tableau denote continuous fields. They are displayed as a number line . They also the axis. Whereas Blue pills denote discrete fields. They slice up your data and also produce headers.


Now coming to the types of bar charts.

Horizontal bar charts:

The bars in the horizontal chart are parallel to the X axis. This means the green continuous field has to be on the column shelf. I used data from the SuperStore sample data set to create some examples. This dataset can be found in Tableau website or on kaggle.com. In the image below, you can see the SUM(quantity) continuous field on the column shelf, and the Sub-category which is a discrete field on the Rows shelf. The sub category data produced the headers on the side for different sub categories in the sales. The bar chart now shows the total quantity of items sold in each sub category.


The bars can be sorted in ascending or descending order to see which sub category made the most or least sales.

To do that these two icons in the tool bar can be used. In the example below, the sales are sorted in the descending order. Binders have the highest sales and copiers the lowest.

Vertical Bar charts:

We simply need to reverse the placement of the discrete and continuous data in the row and columns shelves.

The green continuous pill goes on the row shelf and the blue discrete pill on the column shelf.

Instead of manually moving the pills to different shelves, a vertical bar chart can be made from a horizontal bar chart by using this shortcut icon on the tool bar. And vice versa.

Stacked bar chart:

To create a stacked bar chart, we can use either a horizontal or vertical bar chart. To create stacks, the bars need to be further subdivided into segments. In the marks card, we have different properties that can be used to create segments. There are color, size, label or detail.


In this example, ship mode is used. Dropping ship mode on to color divides the vertical bars in segments.


Adding shipmode again into label adds more information to the stacked vertical bar.


We learnt how to make the three basic bar charts. There are other exciting bar charts like butterfly chart that can be created in Tableau.

27 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page