banner



How To Create A Horizontal Stacked Bar Chart In Tableau

Contents Index

  • Introduction
  • What are Bar Charts?
  • When you should create a bar chart?
  • How to create bar charts?
    • Vertical Bar chart
    • Horizontal Bar Chart
  • Stacked Bar Chart
  • Tableau Side by Side Bar Charts
  • Tableau Bar Chart Formatting
  • Conclusion

Introduction

The tableau bar chart has always been one of the most common and effective charts preferred for data visualization. Be it for comparison data or for showing the frequency, the tableau bar charts have always been instrumental.

In this post, we're going to talk about the following-

  • What is a bar chart
  • When we should create a bar chart
  • how to create bar charts
  • Formatting a bar chart

At the end of this post, you will be able to understand why bar chart is so required in the field of data visualization. And also, the do's and don'ts of the bar chart.

What are Bar Charts- Tableau Essential you need to know?

If you have seen something like below-

Yes, that's a bar chart.

Tableau bar charts are a form of data visualization chart which help us show the frequency of the data corresponding to a categorical variable.

Bar Chart

For example, if we have to show the sales in each category of the population in different states, for all such situation, a bar chart can be an ideal solution. Usually, you will find the developers using bar chart for the generic uses as well. Like they have the data and need to show that using graphs and in such cases, bar chart is the generic solution.

Although this can be somewhat true up to some extent, it cannot be the same all the time. And so, you should understand when to use the tableau bar charts and when not.

This is what tableau bar charts are!

Tableau Online Training & Certification

  • Detailed Coverage
  • Best-in-class Content
  • Prepared by Industry leaders
  • Latest Technology Covered

When you should create a bar chart?

Bar charts are majorly created when we have-

  1. A categorical variable
  2. A numerical variable

So, usually we keep the categorical data on one axis and their corresponding frequency or values will be showing on the other axis.

As for example, in our previous section, we can make state on x-axis and population on y-axis. And the same for the other example where we can keep category on x-axis and sales values on the y-axis.

If we talk about the functional requirement then in below scenarios, we can a bar chart to represent our data-

  1. When we need to show the frequency of certain categories
  2. When we want to compare one category with the other category

Although these can't be the only scenarios when we should use the bar chart. Even if we have continuous data at both the axis also, we can use but that will be either using BINS or using histogram which is similar to a bar chart.

Now as we understand, what is a bar chart and when to create it, let's work and see how to create those.

Read: Tableau Desktop Certified Professional Exam Guide: Cost, Format & Study Tips

Tableau Online Training & Certification

  • No cost for a Demo Class
  • Industry Expert as your Trainer
  • Available as per your schedule
  • Customer Support Available

How to create bar charts?

Creating bar chart is easy and can be done by using a dimension and a measure. Although even a single measure should be sufficient to create a bar chart.

Bar charts are of two types-

  1. Vertical bar chart
  2. Horizontal bar chart

Vertical bar chart is the default and when we say bar chart, that usually refers to the vertical bar chart.

Take our online Tableau training and become a Tableau pro in no time.

#1 Vertical Bar chart

To create a vertical bar chart, we can keep a dimension to columns shelf and a measure to the rows shelf.

For example, let's say we want to create a vertical bar chart for category vs sales.

To do that, we can drag and put category dimension to the columns shelf and drag the sales measure to the rows shelf.

If you want to enable the text to show the sales values, just click on the text value or enable the label from the Marks shelf.

How to create bar charts?

#2 Horizontal Bar Chart

Horizontal bar chart is similar to the vertical bar chart and the difference is having the dimension to the y-axis. Usually, we create the horizontal bar chart when we have labels with more characters.

To create the horizontal bar chart, we can simply swap the rows and columns. This can be done by using the swap option or just pressing ctrl + W.

How to create bar charts?

There is another option to create the horizontal bar chart as well. And that can be done using the show me tab. You can drag the required dimension and measure and then select the horizontal bar chart option from the show me tab.

How to create bar charts?

Read: Tableau Analyst Salary: Every Detail & Factors Affecting

Stacked Bar Chart

Multiple times we come across a situation when we need to go a little deeper in the bar chart. For example, let's say we created a bar chart for category vs sales as we have done earlier. And then further we want to explore the contribution.

The contribution made by each segment in each category. This is similar like if a person earns $1000 then which field contributes how much. It can be like his salary is giving $800, a rental might be $100, and other income might be $100. Combining all these are making $1000.

Whenever we need these kind of analysis, stacked bar chart can be very helpful. Let's see how we can create stacked bar chart in tableau.

Requirement: We need to create a stacked bar chart where the bar chart is in-between category vs sales stacked on segment.

To implement this, first create a vertical bar chart for category vs sales as we have done earlier-

Stacked Bar Chart

And as we need to stack this chart on the basis of segment and so, drag the segment dimension and put it in the color shelf-

How to create bar charts?

Now you will find your graph has been stacked with segment and now the category has been further stacked on segment-

stacked on segment

Tableau Side by Side Bar Charts

This is another variant of the Tableau bar charts where we need to create separate charts for all the categories. The way we have done in stacked bar chart, it will be done on similar way. In Tableau side by side bar chart is directly available in the show me options and can be created just by selecting it. This type of bar chart can be used for comparing the value corresponding to the one or more dimension. Usually, more than one dimension. For example, if we have to compare the values of state vs sales and at the same time also corresponding to the month, we can use side by side chart. Here it will be shown as we are seeing monthly sales data for each state. And this can be a good factor to find out how sales is dependent in our case.

How to create bar charts?

Once Tableau side by side bar chart selected in the above requirement, it will be shown like below-

Tableau Bar Chart Formatting

Bar chart can be formatted on the following options-

  • Color
  • Size
  • Text
  • Alignment and others

We can make changes to color to the chart just by selecting the color shelf in the Marks section. Just select the color as per your choice-

How to create bar charts?

Similarly, we can make changes on the size. This can also be done from the marks shelf itself. Just resize the bar as per the requirements. Make sure, when you're increasing the size, it should not be overlapped. Means while making the bar bigger, your bars may be overlapping each other which should not be the case. While making the size small, there may be a gap of too much which must not be the case as well.

Read: Tableau Career Opportunities: What You Need to Know About Tableau in 2021

How to create bar charts?

The alignment and text formatting can be done just by right-clicking on the bars and selecting formatting option-

How to create bar charts?

This will open a pane in the left pane and there we can make the required changes-

How to create bar charts?

This way we can format the chart as required.

It is very important for you to know about tableau bar chart formatting. These days one of the most frequently asked questions of a tableau interview is "What do you know about tableau bar chart formatting?"

While doing the formatting of the bar chart, we should be taking care of the user perspective as well. For example, the selected color should be pleasant to the eye, the size should not be too big nor too small, labeling should be proper and must convey information. Also, tooltip should be aligned in a way to convey additional information.

For example, if you're showing the numbers in the bar chart, you may show the source of those numbers, comparison, and many other information on the tool tip. Also, tooltip should be formatted properly for the users to get additional information.

As shown in the above image, you can make the changes in the formatting in accordance to the requirement. For example, for making changes to the entire worksheet, you can select the sheet tab, while making changes to the specific rows and columns, select the respective tabs of rows and columns accordingly.

Tableau Online Training & Certification

  • Personalized Free Consultation
  • Access to Our Learning Management System
  • Access to Our Course Curriculum
  • Be a Part of Our Free Demo Class

Conclusion

This was all about how to create a tableau bar chart where we talked about what is a bar charts, when we should use it, different forms of a bar chart and about tableau bar chart formatting those bar chart. While creating the bar chart, you must be considering why you are creating this?

Can you make any better way to visualize with other charts available? If you have got the answers to these questions then you will definitely end up creating a graph which will make more sense for sure.

Do try these different bar charts for different scenarios and let us know if you face any difficulty while creating the bar chart.

FaceBook Twitter Google+ LinkedIn Pinterest Email

Comments

Trending Courses

AWS

  • AWS & Fundamentals of Linux
  • Amazon Simple Storage Service
  • Elastic Compute Cloud
  • Databases Overview & Amazon Route 53

Upcoming Class

6 days 29 Nov 2021

DevOps

  • Intro to DevOps
  • GIT and Maven
  • Jenkins & Ansible
  • Docker and Cloud Computing

Upcoming Class

10 days 03 Dec 2021

Data Science

  • Data Science Introduction
  • Hadoop and Spark Overview
  • Python & Intro to R Programming
  • Machine Learning

Upcoming Class

3 days 26 Nov 2021

Hadoop

  • Architecture, HDFS & MapReduce
  • Unix Shell & Apache Pig Installation
  • HIVE Installation & User-Defined Functions
  • SQOOP & Hbase Installation

Upcoming Class

3 days 26 Nov 2021

Salesforce

  • Salesforce Configuration Introduction
  • Security & Automation Process
  • Sales & Service Cloud
  • Apex Programming, SOQL & SOSL

Upcoming Class

4 days 27 Nov 2021

QA

  • Introduction and Software Testing
  • Software Test Life Cycle
  • Automation Testing and API Testing
  • Selenium framework development using Testing

Upcoming Class

4 days 27 Nov 2021

Business Analyst

  • BA & Stakeholders Overview
  • BPMN, Requirement Elicitation
  • BA Tools & Design Documents
  • Enterprise Analysis, Agile & Scrum

Upcoming Class

6 days 29 Nov 2021

MS SQL Server

  • Introduction & Database Query
  • Programming, Indexes & System Functions
  • SSIS Package Development Procedures
  • SSRS Report Design

Upcoming Class

4 days 27 Nov 2021

Python

  • Features of Python
  • Python Editors and IDEs
  • Data types and Variables
  • Python File Operation

Upcoming Class

3 days 26 Nov 2021

Artificial Intelligence

  • Components of AI
  • Categories of Machine Learning
  • Recurrent Neural Networks
  • Recurrent Neural Networks

Upcoming Class

3 days 26 Nov 2021

Machine Learning

  • Introduction to Machine Learning & Python
  • Machine Learning: Supervised Learning
  • Machine Learning: Unsupervised Learning

Upcoming Class

38 days 31 Dec 2021

Tableau

  • Introduction to Tableau Desktop
  • Data Transformation Methods
  • Configuring tableau server
  • Integration with R & Hadoop

Upcoming Class

10 days 03 Dec 2021

How To Create A Horizontal Stacked Bar Chart In Tableau

Source: https://www.janbasktraining.com/blog/create-a-bar-chart-in-tableau/

Posted by: linseymarban.blogspot.com

0 Response to "How To Create A Horizontal Stacked Bar Chart In Tableau"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel