Tableau’s suite of tools allows you to connect to a variety of data sources, analyze and visualize your data to find insights, and securely share those insights with the people who need them. Tableau Desktop’s drag-and-drop interface makes it quick and easy to get started creating the most commonly used charts. You can immediately incorporate Tableau into your workflow and have fun exploring and visualizing your data.
My goal today is to get you started using Tableau to improve your workflow, and I want to get you there quickly. To set the stage, let me give you a bit of background into my Tableau journey. I am an educator with more than 20 years of teaching experience. Prior to coming to work at InterWorks, I was a university instructor in both the Department of Education and the Department of Instructional Design and Technology. I love tech, so I was asked to help out with an accreditation project, in which we needed someone to wrangle and share data insights while also creating tools and processes for getting us accredited. I started this project with only messy data and Excel. After two months of struggling, I discovered Tableau. Within two hours of installing Tableau Desktop, I had reproduced what took me two months to do using Excel. I was hooked and haven’t looked back since.
I’d love for you to have an experience similar to mine, but with the added benefit of knowing what I wish I’d understood about Tableau when I first began. Let’s get you off on the right foot (or the left, if that’s how you roll).
The Typical Tableau Workflow
Connect to Your Data
Let’s connect to the Get Started data that is linked above.
- If you downloaded the .xlsx file, click on the Microsoft Excel link in the Connection pane and navigate to the file on your computer. Select the file and click Open.
- If you downloaded the .csv or you copied the data into Notepad and saved it as a .txt file, you will select the Text file link in the Connection pane and navigate to the file on your computer. Select the file and click Open.
Preview Your Data
We only have one sheet in the data file, so Tableau automatically brings the sheet of data into the Preview pane. If you ever have more than one sheet to choose from, simply double-click or left-click-drag the sheet you need into the section above the Data Preview area (where it says Drag Tables Here).
I always recommend spending a few minutes exploring the preview of your data. You will see column headers (a.k.a. field name) for each column in your data, icons representing the data types Tableau interpreted each column to be (strings, numbers, dates) and a sample of the first 1000 records (rows):
There are quite a few things you can do in the Data Preview, so click around and explore. You can’t break anything and nothing you do ever writes back to the data source. In fact, I encourage you to look at the data source again after you finish this walkthrough just to prove to yourself that your original Excel file is untouched.
Clean Your Data
Did you notice that the Location has both country and state in the same column? This is a pretty common problem. Let’s do a bit of clean-up:
- Split Locations by right-clicking in the column header and selecting Split from the menu.
- Right-click in the new column header, Location – Split 1, and rename it to State.
- Click the data type icon, select Geographic Role and State/Province to assign latitude and longitude data to those field members.
Get to Know Your Workspace
Now that our data is clean, we are ready to start exploring and visualizing our data. Click on the Sheet 1 tab at the bottom left of your workbook to get started (if you’ve just opened Tableau for the first time, it might even be highlighted in orange for you).
Let’s take a quick tour of the workspace:
- Menu – Explore the different menu options to see what is in each one.
- Toolbar – The toolbar buttons will be greyed out until you have created something to use them with. Hover over each to see a tooltip with its name.
- Worksheet View – This is the area where you will build your visualizations.
- Cards and Shelves – You will drag fields onto these areas to add data to your view.
- Columns and Rows Shelves – Adds headers or axes to the view.
- Filter Card – Adds filters to your view.
- Marks Card – Encodes your visualization (mark type, color, size, shape) or adds additional data to your visualization (tooltips, labels).
- Data Pane – The qualitative data fields are in the top section of the Data pane, and the quantitative fields are in the bottom section. The names you see listed are the column headers from your data. Notice the data type icon? Here, you can change the data types, field names, geographic roles and more, similar to how you did in the Data Preview.
Build Your First Bar Chart
I want to create a horizontal bar chart that shows me the summed sales for each of the product sub-categories in my data. If you look at the Columns and Rows shelves, you’ll notice an icon next to each. Those icons show you the orientation of the headers, or axis tick marks. Some of you may also find it easier to remember that the Rows shelf will create headers or axis tick marks along the vertical axis (Y axis), while the Columns shelf will create headers or axis tick marks along the horizontal axis (X axis). While you are learning, you will likely place them backwards at least once, but no fear! There is an axis swap button in your toolbar:
- Left-click and drag the Sales field from the quantitative section of your Data pane and drop it on the Columns shelf.
- Left-click and drag the Subcategory field from the qualitative section of your Data pane and drop it on the Rows shelf.
- Click the swap axis button in the toolbar (swap back and forth and watch the Sales and Subcategory fields on Rows and Columns).
- Click the Descending Sort button on your toolbar.
- Click the Color card on your Marks card and change the bars to grey.
- Click the Fit dropdown on your toolbar and select Entire View.
Congratulations! You’ve just created your first visualization, and in my opinion, it’s the most useful chart there is! Don’t forget to name the Sheet 1 tab. Double-click on the Sheet 1 tab name and when Sheet 1 turns blue, rename it Sales by Subcategory (you can see me change the name on Sheet 2 in the GIF below).
Before we move on to the next demonstration, I want to take a few minutes to talk about a few things I hope you noticed when you built the bar chart:
- When you dropped Sales (a green field) onto Columns, you got an X axis for the Sales values. In fact, at first, you had a single bar with a value of $863,145. That was the total summed sales for the entire dataset.
- When you added Subcategory (a blue field) to Rows, you got a header for each of the 13 subcategories (along the vertical orientation). These blue fields gave us a breakdown of the sales for each subcategory. If you hover over Phones, you’ll see that it has a summed sales value of $179,515 and if we totaled all of the bars up, we’d be back to $863,145.
The First Concept I Wish I’d Known When I Started My Tableau Journey
The first concept I want you to keep in mind is that Tableau is an aggregator. If I drag a green field to the view, Tableau is going to SUM it by default. Then when we drag a blue field to the view, we are going to segment the value. I like to tell people to remember that the level of detail in the view (a.k.a. segmentation) is the combination of the blue fields on your view (look at your Rows, Columns and Marks card).
What do I mean by blue fields and green fields? Glad you asked. This is one of the most important foundational concepts that I want you to understand.
Blue fields are discrete fields used to segment our data and create headers.
- Discrete fields will often have values that are strings or booleans (T/F), but they can also be numeric values that act like strings (think Row ID). We will discuss dates below, but dates can also be discrete.
- Take, for example, a field called Animals. This field includes the members: cat, dog, horse. It is discrete because an animal can either be a cat or a dog or a horse, but there is no range between cat and dog (unless you are Catdog from the ’90s cartoon).
Green fields are continuous fields with which we do math in order to get values on an axis or in a table.
- Green fields are numeric and can be integers or floats (a.k.a. decimals). We can SUM, AVG, MIN, MAX, STDV or any other mathematical operation on green continuous fields.
- Take, for example, a field called Age. This field is continuous and can contain any numeric value that represents age from birth to death. Age definitely has a range between values. I can be one year old, 59 years old or anywhere in between. In fact, when we do math on continuous fields we get results that can be any value from the smallest result to the largest. This doesn’t mean that all of the possible values are in my data, but it means we could have values anywhere along the axis when we do math.
After you work in Tableau for a bit, you will start to internalize the concept of Blue Discrete and Green Continuous and you’ll be able to use that knowledge to help you do new and exciting things in Tableau. As you keep practicing, watch how Tableau responds to your actions. One day soon it will click, and you’ll forget that there was a time when you didn’t understand it.
Build a Line Chart
I want to create a chart that lets me see how my Sales have done over time. I have a date field in my Data pane and if you noticed in the Data Preview, it includes four years’ worth of dates at the month level. If you want to check it out now, click on the Data Source tab in the bottom-left of your workbook (left of Sales by Subcategory tab).
Quick Tip: If you left-click-drag a date to Rows or Columns, it will aggregate to the YEAR, and then you’ll right-click on the YEAR field to change it to what you want. OR if you instead right-click-drag the date to Rows or Columns, you will get a dialog box asking you how you want to drop the field. This is my favorite method because it saves me several clicks (they add up):
- Click the New Worksheet icon to the right of Sales by Subcategory tab (hover to see which icons are which).
- Double-click and rename Sheet 2 to Monthly Sales Trends.
- Right-click-drag the Order Date field from the qualitative section of your Data pane to Columns.
- Watch the GIF to see me left-click-drag (yellow highlighter) and then right-click-drag (red highlighter).
- In the Drop Field dialog box, choose the green MONTH(Order Date) option and click OK.
- Left-click and drag the Sales field to your Rows shelf.
- Right-click on the Date axis and delete the Axis Title.
- Right-click in the gridline area of the chart and Show Trend Lines.
The Second Concept I Wish I’d Known When I Started My Tableau Journey
- Move the color legend under the map:
- Virtual Event Recap: Data Prep in Tableau Desktop – This blog includes a webinar recording and tons of resources to help with every aspect of the data-prep process.
Are you looking for more comprehensive assistance? Maybe something more niche? At InterWorks, we can help with more than Tableau. From IT networking and cloud migration to custom training and strategic roadmapping, we’d love to partner with you. Reach out to our team, and let’s talk about what you want to accomplish with your data. Chances are good that we have expertise and experience in the solution that will help you achieve your goals. We look forward to beginning the conversation!