Bar Chart in Tableau is handy to compare the data visually. For example, If we want to check the Sales by Color, we can use this bar chart. By seeing this bar chart, One can understand which color product is performing better compared to others.
Creating a Bar chart in Tableau Desktop is very easy. If you drag a measure to Column Card and Dimension to RowCard, it will automatically generate the Bar Chart. In this article, we show you how to create a Bar Chart in Tableau and Stacked Bar Charts with an example. For this, we are going to use the Data Source we created in our previous article. Please visit Data Labels in Tableau Reports article to understand the Data Source.
Create a Bar Chart in Tableau Approach 1
First, Drag and Drop the Color Dimension to Row Shelf and Sales Amount to Text option in Marks Card. Since Sales Amount is a Measure value, it will aggregate to default Sum.
Now we have to change the Table report to Tableau Bar chart using the Show Me option. Please expand the Show Me window and select the Bar Chart from it
Once you choose the Bar Chart from Show Me window, Bar Chart will be displayed as shown in below screenshot
Tableau allows us to convert the Horizontal Bar Chart to Vertical Column Chart. To do this, please click on the Swap option present in Tableau Toolbar as shown in below screenshot
Once you click on the Swap option, Our Horizontal Bar Chart is converted to Vertical Column Chart as shown below
If you observe the above screenshot, It is providing a perfect result, but we are unable to identify the exact amount Sales of each color. To resolve these situations, We have to display the Data Labels.
Adding Data labels to Bar Chart in Tableau
To add data labels to Bar chart, Please drag and Drop the data Label values from Dimension or Measures Pane to Label option in Marks Card. In this example, We want to display the Sales Amount as Data labels so, Drag and Drop the Sales Amount from Measures region to Labels option
Once you did, You can see the Data Labels in Tableau Reports
Stacked Bar Charts in Tableau
Creating Stacked Bar Charts in Tableau Desktop is very easy compared to any other Business Intelligence Tools. In this example, We want to Stack the Bar Chart by the Country Region So, we are dragging English Country Region Name from Dimension Region to Color Option in Marks Card
Once completed, You can see the Stacked Bar Chart, as shown in the below screenshot. Tableau Desktop allocates default colors for every region, but from the Marked Region, You can edit the colors by selecting the Edit Colors.. option from the context menu.
Create a Bar Chart in Tableau Approach 2
This method is very easy and straightforward. First, Please select the Bar option from the drop-down list present in Marks Card
Next, Drag and Drop the Color from Dimension Region to Rows Shelf, as shown below.
Next, Drag and Drop the Sales Amount from Measures Region to Filed region. Since it is a Measure value, the Sales Amount will aggregate to default Sum. And you can see the Tableau Bar chart