Bar chart is often considered as one of the most useful chart type for data visualization. Not just because it is readily comprehensible, but also it offers a high level of transparency regarding the data and it's highly compatible for comparing, sorting, and filtering values of different variables. Here is an article that shows different types of bar charts and how we could create them in Tableau. Each video shows how to create one type, with a brief explanation on what kind of data type we should put on each Axis. Along the definitions, you will find the keywords "Measure" and "Dimension". There's a lot of different definitions for both terms, but as for my version of understanding, Measure is the numerical value, that can be aggregated, calculated, and used to compare between two or more variables on, while Dimension describes more on the variables themselves, or categories, or labels, or locations, or time stamps, or true-false statements, or also numbers, that usually has limited number of unique values. We will talk about what kind of element each chart needs: Dimension(s), Value(s), or both, and how do we put them in tableau: color, size, text, details, tooltip, angle, or any other available option in tableau. For the videos I used the sucperstore data, which actually comes in a package together with the Tableau Desktop. Or you can download it from the link below. Alright here we go.
Basic Bar Chart
- Take Sub-Category as Dimension.
- Take SUM([Sales]) as Measure.
- Put one of them in ROWS and the other in COLUMNS. You can always swap them anytime later.
- You can also sort them and change the color however you feel like it. Take either the Sub-Category or the Sales for the color: Sub-Category for discrete color, or Sales for continuous color.
Stacked Bar Chart
- Do the same as the Basic Bar Chart.
- This time, take another Dimension as color. For example: Region. There you go.
Stacked Bar as Percent of Total
- Build the Stacked Bar Chart as shown in the "Stacked Bar Chart" section above.
- Right click on the SUM([Sales]) - Quick Table Calculation - Percent of Total.
- Right click again on the SUM([Sales]) - Compute Using - Region. There you go.
Paired Bar
- Pick Category as Dimension and SUM([Quantity]) as Measure. Put one of them in ROWS and the other in COLUMNS.
- Right click on the Order ID, and hold it. Drag the Order ID while holding on the right click to the chart area. Drag it to the X-Axis area so you can see a small pair of green bars appearing. Release it there to generate the second bar set. By now you should have Measure Name and Measure Value.
- Take Measure Name as color to define different colors to each variable Quantity and Count of Order ID.
Column Bar
- Drag the Order Date to COLUMNS. We'll have the YEAR by default, and that's what we want to use here. We'll also find a plus sign (+) that we can click on, to create drilldowns of whatever variable we have, in this case the Order Date. If we click it, it will show the QUARTER.
- Take SUM([Sales]) to ROWS. And SUM([Sales]) as color to generate some color gradients. You will then have bar charts for each quarter for each year.
Spark Bars
Follow along the steps in the video, it's pretty much self-explanatory. Notice that we need to create a Calculated Field to give different colors to positive and negative values here, and apply some filters to choose just a part of the data instead of showing all.
Bar in Bar: Dual Axis
We can also utilize the Dual Axis option in the Tableau to make more variations to our charts. Follow along the steps in the video, it's pretty much self-explanatory. One thing that I forgot to do in this video was synchronizing the axis after creating Dual Axis, which can be done by clicking on the Y-Axis on the right side (Sales 2021) and choose "synchronize axis".
Diverging Bar: Dual Axis
Again, in this chart we need to use dual axis, and also some Calculated Field. I also forgot to synchronize the axis, which can be done in just a few clicks. See the explanation for it in "Bar in Bar: Dual Axis".
Lollipop Chart
Follow along the steps in the video, it's pretty much self-explanatory. The Bars, as well as the position of the circles, define the sum of the sales for each product category, whereas the color of the lollipop defines the sum of the profit for each product category.
Bullet Graph
Follow along the steps in the video, it's pretty much self-explanatory. The blue bars show the sum of sales in 2021, while the reference lines on each bar show the sum of sales for year 2020. The different colors behind the bars show the 20%, 40%, 60%, and 80% of the sum of sales in 2020. It is a good way to compare values of two different parameter, especially to compare the values with the previous values.
Well that's all I can fit in for now, there are of course more variations of bar charts that we can create in Tableau, but let's save it for another day. These are the basic bar charts that we would want to create quite a lot of times, and I hope the videos in this article can be of use.