The world’s leading publication for data science, AI, and ML professionals.

Creating Visualizations with Tableau Made Simple

From installing the software to delivering a dashboard

Image by pressfoto on Freepik
Image by pressfoto on Freepik

"Dream big. Start small. Act now. "— Robin Sharma

This is one of the key principles I live by. This is not only for the life goals you wanted to achieve but also for the learning goals you wish to achieve.

Many of us see any technology or tool as a hurdle and procrastinate our learning process, thinking we are too busy to start something huge at this time.

But I wanted to interrupt and tell you, getting started with creating cool visualizations with Tableau is not hard. I will go through an elementary example to make it evident.

Take it as a challenge to yourself, create your first Tableau dashboard with me, and kickstart your Tableau learning. Are you ready?


What is Tableau?

Before we jump into our hands-on session, let’s look at what Tableau is.

Tableau is an excellent and powerful Data Visualization and business intelligence tool used for analyzing and reporting huge volumes of data.

Data Scientists and Machine Learning Engineers mostly rely on Matplotlib, Seaborn, and Plotly for visualizations. But instead using Tableau for visual analytics will give more professional touch and is easy to present to the stakeholders.


Installing Tableau

Installation of Tableau is pretty simple. Head over to the Tableau official site and hover over "Products" in the menu bar.

You can either choose Tableau Desktop or Tableau Public. Tableau Desktop is the paid version with a 14-days free trial, whereas Tableau Public is available for free.

Tableau Public is free to use but cannot save the workbooks you create locally. They can be saved to Tableau’s public cloud, which anyone can access and view.

Decide the product you prefer, choose the executable depending on your OS, and click download.

After you download the executable, run it and install Tableau. There you are, all ready to dive into the next phase.


Connecting to the Data source

Data is the key to any visualization. Tableau supports connecting with a wide range of data sources.

Tabluea comprehensively lists all the supported connectors. Few of the data sources include files you have on your machine like Microsoft Excel, Text files, JSON files, PDFs, etc., or servers such as MySQL, Microsoft SQL Server, or Oracle, etc. Tableau also supports connecting to cloud sources by the cloud service providers; AWS, Azure, and Google Cloud Platform.

For simplicity, we will be using a Microsoft Excel file to begin our learning journey.

I’m picking the US Superstore dataset, which consists of a list of transactions of an e-commerce platform from 2014 to 2018 and is available on Kaggle. Go ahead, download the data (all you need is a free Kaggle account), and kickstart your hands-on session with me.

Open up the Tableau software installed in the previous step. You will see a screen similar to the one in the screenshot below.

Screenshot by the Author
Screenshot by the Author

In the left pane, under Connect, you see all the types of files and servers you could import data from. The data source we are about to use is a Microsoft Excel file. Therefore under the Connect, click on Microsoft Excel and choose the file you just downloaded.

Once you load the data, you will see a screen similar to the below screenshot. Under the Connections, you will be able to see the connection you just created.

In the main view, you can see the data you just imported.

Screenshot by the Author
Screenshot by the Author

To start developing your visualizations, click on Sheet1, which will open up your worksheet for development.


Dimensions and Measures in Tableau

Your worksheet is ready for creating your visualizations. But before that, let’s have a look at the Data pane on the left. It shows all the variables in the data loaded.

According to Tableau, the data loaded is automatically divided into dimensions and measures. The categorized variables are color coded. If you carefully have a look, you can see the dimensions in blue color and the measures in green color. This separation is automatically performed by Tableau to enhance the user experience.

After the auto categorization, all the variables you get as dimensions are mostly categorical variables, and the variables you get as measures are numerical variables. The measure can be aggeregated or manipulated. To better understand this, have a look at the separation done on the dataset we were using.

Screenshot by Author
Screenshot by Author

With the understanding of dimesions and measrues, let’s next move on to the significant phase of this learning. Are you with me?


Creating Visualizations

Having a clear understanding of data sources, dimensions, and measures, let’s step into creating visualizations.

We will be creating visualizations to answer the two questions below.

  1. How do sales vary between states in the US?
  2. Which product category is generating high profit?

To better understand how to approach a visualization problem, a Simple 5-Step Guide to Master Data Visualization might help you.

1. Sales varying between different states in the US

To visualize the variation of sales with the states, we need to choose the columns and rows as required. You will have to drag and drop from the Data pane to the Shelves on the top.

  • Drag and drop the Country dimension to the Columns.
  • Drag and drop the State dimension to the Columns.
  • Drag and drop the Sales measure to the Rows.

Note: As all the data in the dataset has the United States as the value for the Country field, you will not need the Country dimension to be in the Columns. But generally, if the data consists of more than one country, you will need it.

Screenshot by Author
Screenshot by Author

Once you perform the above steps, you will have the bar charts created.

Update the title to describe the visualization you just created.

Screenshot by Author
Screenshot by Author

Hooray! You have developed your first visualization. Keep up the spirit and move to the next question we are about to answer.

2. Which product category is generating high profit?

To identify which product category generates higher profit for the Superstore, we will need visualization of Profit vs. sub-category.

To generate this chart,

  1. Drag and drop the Sub-Category dimension to the Columns.
  2. Drag and drop the Profit measure to the Rows.
Screenshot by Author
Screenshot by Author

When you perform the above steps, the below chart will be generated. Remember to update the title with a suitable description.

Screenshot by Author
Screenshot by Author

Using the visualization, you can clearly see that Copiers sub-category generates the highest profit for the Superstore.


Creating Dashboards

You have come a long way. Only one step away from completing the first level of your Tableau learning game!

You have created many charts (two in our case) and wanted to present them to a stakeholder. How do you show all the analysis you did in a more presentable way?

Tableau Dashboards are there for the rescue.

Tableau dashboards are a great way to present a collection of charts from many worksheets. The collective view of the charts generated makes it much easier to communicate the analysis on the dataset.

To create a dashboard, click on the New Dashboard tab at the bottom left.

Screenshot by Author
Screenshot by Author

In the left, Dashboard pane, under Sheets, you will see all the worksheets you have created visualizations.

Screenshot by Author
Screenshot by Author

Note: You can rename your sheets by right-clicking on the sheets tab. If you haven’t renamed the sheets, you will see them as Sheet1, Sheet2, and so on.

To create the dashboard,

  1. Drag and drop the sales (Sheet1) sheet to the view
  2. Drag and drop the subcategory (Sheet2) sheet to view such that it comes below the sales visualization.
  3. Update the title to describe the dashboard. (If you do not see a title already, follow Dashboards menu > select Show title).
Screenshot by Author
Screenshot by Author

That’s it! You have created your first dashboard!


Final Thoughts

Congratulations! You have completed level one of your Tableau Learning Game.

Remember:

  1. Now is the perfect time to start any of your learning wishes.
  2. Learning something new is not hard. You have to take one small step at a time.
  3. Be consistent with your efforts, and you are on your way to success.

Thank you so much for reading this far. I hope you enjoyed reading and you have not only kickstarted your Tableau learning journey but are also motivated to start any of your learning wishes. I’d love to hear your feedback on how I can improve. Looking forward to seeing your success stories!


Related Articles