Ryan Sleeper
Meet the instructor, Ryan Sleeper, and learn the fundamentals of Tableau Desktop including: Tableau’s product ecosystem, how to connect to data, getting to know Tableau’s interfaces, dimension versus measure, discrete versus continuous, and how to make a bar chart.
All right, as for introduction, my name is Ryan, Ryan Sleeper. The reason this URL on the screen might be relevant to you is my entire data visualization portfolio is available at that URL. I’m going to be sharing several examples from my own Tableau Public portfolio throughout the next four days. And it was important to me to help people learn to make them all downloadable. So no matter how complex the work, no matter how much that work may have been worth, you can actually download the file itself, look under the hood, see how it was built, copy it, use the data set. So I encourage you to check out ryansleeper.com, and you can download anything you see and kind of learn how I went through the exercise to create that visualization.
I’m the founder of Playfair Data. We’re a visual analytics consulting agency. And the reason this URL may be of relevance to you is our team of visual analytics associates blogs very regularly. We have a couple of hundred different tutorials out there on playfairdata.com. There’s no strings attached. There’s no fee. You can read them. Another great learning resource to help you retain some of the things that we’re talking about. And it’s a great source of documentation for a lot of these individual tactics that I’m going to be sharing with you.
A little bit about my Tableau background. I’m a three time what’s called Tableau Zen Master. This is the highest recognition that Tableau, the company themselves, hand out. It’s not a certification. You get nominated by the community and then a group of Tableau employees decides who’s a Tableau Zen Master that year. I’ve earned that three times. In 2015, I authored the Tableau Public Visualization of the Year. Tableau Public is a free version of Tableau. We’ll talk about this a lot, because it really helped me in my career and it really helped me practice. So we’ll come back to this and I’ll provide more detail. But one of the catches with Tableau Public is your work has to be saved to the public web. So these are all visualizations that are built for a mainstream audience. Very design heavy, very high on engagement. And in 2015, my visualization was picked among 80,000 visualizations that year as the Viz of the Year.
And then in 2013, which feels like it’s getting to be a very long time ago, I won the third iteration of what’s called the Iron Viz Championship. This is Tableau’s Super Bowl is how I describe it. It’s a annual contest held live at their conference. Usually there’s about 10,000 people in the audience and there’s three finalists. The three finalists are each given the same data set, and then they have 20 minutes to create the best visualization that they can. And I won that contest way back in 2013.
I also have several books on the topic. I’ll tell you a little bit about these if you want to continue learning after this or complement this live training event. My first Tableau book is called Practical Tableau. It includes one hundred different chapters spanning five sections, everything from the most basic fundamentals to some tips and tricks to some storytelling tactics to strategy. There’s a strategic framework in there as well. So very well rounded book covering lots of Tableau and data visualization in general.
Then Innovative Tableau took some of the tips and tricks in the first and this one is, well, a little more innovative, if you will. It’s where the title came from. But this book is for if you’ve already got some experience in Tableau. These are some of my favorite tips and tricks that aren’t native to the software. I had to kind of think through solving a problem. And then I documented it in Innovative Tableau and there’s 100 more chapters. So 100 more tips and tricks.
And then my newest book, I’m working on it as we speak, it’s supposed to be released in May. That’s called Tableau Desktop Pocket Reference. And this is essentially the fundamental section of Practical Tableau, but I rewrote every single chapter from scratch and incorporated everything that I’ve learned in about the last it’s been 11 years now since I’ve started using Tableau.
I share all those credentials on the last two slides because I’m proud of it, but I want to be careful not to make it an intimidating thing. I actually think that anybody can achieve anything that I’ve covered on the last two slides. And those credentials lead into my two favorite slides, which I’m going to share next.
Even though, as I mentioned, I’ve been using Tableau for over a decade now, I would say that my learning curve looks something like this on the screen. And that long, flat line in the beginning represents about two years of really struggling with the software. I have no background in data prior to being introduced to Tableau. I graduated with an MBA and a Master of Sport Business Management. But at the time there was no, well, very few data related courses and especially degree programs. That’s become extremely trendy, and it’s available everywhere now. I did not have that.
I actually think that that makes me uniquely qualified to teach you Tableau, because I’ve been through the pitfalls personally. I know where it goes wrong and the questions that you have when you don’t have that kind of data foundation or education. So my hope for this course is that your learning curve looks more like this one. And I really do think that this is possible. My objective is to help make your life easier and catch you up with me as efficiently as possible. And my specific measurable objective for you buying into our training ecosystem and trying to teach you and help you level up in Tableau is my hope is to get you into the 80th percentile of Tableau users worldwide.
And I know that that sounds very ambitious, but I’ve seen it work. It’s a proven curriculum. And the reason that I think it works is most companies and users are not using Tableau in the correct way. This is why we also incorporate some data visualization and design thinking into this course, because it really helps you kind of take Tableau as far as it possibly can go. And so that’ll be kind of tied in throughout this course.
All right, so let’s do it. Let’s get into it. First thing I’m going to share is a little bit about Tableau’s product ecosystem, because it can be quite confusing for a beginner. Their product options are admittedly a little bit convoluted. And to make matters worse, you might have a manager or a stakeholder tell you, well, just go download Tableau and then do this in Tableau. Well, you don’t just go download Tableau. Tableau is a brand. And under that brand umbrella, they have many different products. They have Tableau Desktop, Tableau Public, Tableau Server, Tableau Online, Tableau Mobile. That’s not even a comprehensive list. So it’s important to understand which product we will be using throughout the next four days.
Tableau is currently on a license based model. There are three different license types that you can purchase. The first is called a Creator license. This is for your power users. If you are a Creator at your organization, you get access to these three products; Tableau Desktop, Tableau Prep, and Tableau Server or Tableau Online. The distinction is where that server is hosted. Tableau Server is hosted by your own organization. Tableau Online is hosted by Tableau themselves.
The focus of this course is going to be that first one, Tableau Desktop. Tableau is also on a very aggressive release schedule where they put new features into the Desktop product every quarter. So their naming convention for the version of the software is the year and then there is a decimal followed by the quarter that it was released in. So the current version of Tableau Desktop, the most up to date version you can possibly install, is called 2020.4. That indicates that it was released in the fourth quarter of 2020. Everything I’m going to be showing you so far, unless there’s a change this week, is going to be in Tableau version 2020.4.
Don’t be alarmed if you don’t have the latest version. That’s very common, especially in larger organizations. I would say that as long as you’ve got a version that starts with 2018 or later, you’re going to be able to follow along with 90% plus of the content that we have to share with you. So don’t be worried if you don’t have the very latest. There will be a couple of moments throughout the training where I’ll point out that, hey, this is a new feature. If you’re not seeing it, it’s probably because you haven’t upgraded to the latest version.
Just to close the loop on the other types of licenses, the second type is called an Explorer. This allows you to view and interact with workbooks that the Creator has published for other people to see. And then there’s a wholesale option called Viewer. And here’s the first time where I’m not going to read you every single thing in this table. But just to reiterate what the focus of this course will be, we’re assuming that we are Creators. So we’re kind of the power users. And we’re going to focus on the Tableau Desktop product. Tableau Desktop allows us to create different visualizations and then publish them to a server so that other people in the organization can see them. That part is optional. We’ll be talking about various ways to distribute these workbooks throughout the course as well.
All right, from here on out, I’m going to open Tableau as if it’s for the first time so that you can follow along. I’ll be jumping back and forth between PowerPoint and Tableau Desktop. Again, I’m on 2020.4. So to get started, what I’m going to do, and I’m also on a Windows machine, I’m just going to search for Tableau. And there’s 2020.4. I’m going to click that button. This will take a few seconds to load. And here we are in Tableau Desktop.
To quickly introduce you to this welcome screen, if you’ve built anything in Tableau before, you will see thumbnail images of those dashboards here in this very large blank space. There’s also a couple of sample dashboards at the bottom that you can actually open and reverse engineer to learn a few tricks that way. There’s a Discover pane with some various basic training videos. There’s usually some type of advertisement in the bottom right corner.
But the main focus of this welcome screen for you as a power user is going to be this left side, the Connect pane. This shows you all the different data types that you can connect to. Under ‘To a File’, you will see some local data types, like Microsoft Excel, text files. Those are files that end with the extension .txt or .csv. But all these are local. You can store them on your own machine. A little bit further down it says ‘To a Server’. These are more enterprise level data sources that typically live in some type of database. So you have to enter credentials and a location of the database in order to connect to the data.
If you click this ‘More…’ button, you’ll see that there are quite a few more options. And all the ones with names are native to Tableau. So they’ve already developed or integrated those types of data connections straight into the software. If you don’t see what you’re looking for, there’s also ‘ODBC’ and ‘JDBC’. These are kind of more custom ways to connect to databases. And same with ‘Web Data Connector’. These are custom data connectors that people are building using APIs. I can’t claim to have used even half of these in the real world, but hopefully you see one that looks familiar that your company is using. You likely do.
Do not click on anything yet. I’m going to point out the data set that we’re going to be using throughout the course, but I don’t want you to click on it yet, because we’re going to access it in a slightly different way. The data set we’re going to be using is called ‘Sample-Superstore’. And I admit, again, that this data set at this point in Tableau’s lifecycle is very pervasive. If you’ve used Tableau ever before, you’re probably cringing that we’re going to use this data set again. But there’s some real benefits to using it.
First of all, it really does have a lot of good learning opportunities. It’s been structured to teach people Tableau, so there’s a couple of places that aren’t very realistic, because it’s such a perfect data set. And I’ll try to argue both sides and point out when that’s the case where I might say, OK, this probably won’t look like this in the real world. Here’s one more step you have to do. Maybe even a bigger reason I like to use this data set, though, is because it is so pervasive, if you try to go continue learning Tableau after this course, if you read any of my three books, if you read most of our 200 blog post, watch 141 videos, they’re almost all going to use the ‘Sample-Superstore’ data set. So I want you to get some familiarity with it so you know what the fields are and kind of how it ticks.
Everything that we’re going to be covering, including the data sources, I’ve put into a shared Google folder, which you can access by going to ‘playfairdata.com/training materials’, plural. That will take you straight to the Google Drive. But this first one is actually on everybody’s machine. The ‘Sample-Superstore’ data set comes with every installation of Tableau.
But the reason I asked you not to click on it is we’re going to access it in a different way. We’re going to actually click ‘Microsoft Excel’, because this is an Excel file. So instead of clicking down here, click ‘Microsoft Excel’ and navigate to your ‘Documents’ folder on your machine. And when you install Tableau Desktop, every single person gets this folder in their documents project called My Tableau Repository. One of the folders within My Tableau Repository is called Data Sources.
And if you click Data Sources, you’ll see all the different versions of Tableau that you have installed on your machine. Then just click the latest version, so the highest number. Double click on that. Depending on where you are in the world, you’ll most likely see English US, but it’s possible that you will see a different folder here for the language. Just click the language that you’re using. And you should see Sample-Superstore. After I’ve highlighted that, I will click Open. And that takes us to the next interface that we can learn. This is where we can connect to a specific table and learn how to use it.
But before we do that, I’m going to jump back to PowerPoint and share what I view to be the single largest barrier to Tableau adoption. And I’ve seen this play out over and over again in my career, but it happens to also be my own experience. So I’ll just share it from my own perspective.
My very first job out of grad school, I was kind of a general analyst. I was doing most of my work in Google Analytics. But like a lot of companies, most of our reporting was done in Microsoft Excel. But one day the boss walked in and said, I’ve heard of this tool Tableau. There were three of us analysts in the room. And the boss said, can you take a shot at migrating our existing Excel reports over to Tableau Desktop?
So we opened Tableau. As we just saw on the Connect pane, literally the first option is Microsoft Excel. So we’re all thinking, wow, this is going to be great. It says Excel. I’ll just click Excel and my report will magically appear. This will be so easy. Maybe we can even go home early today. But hopefully you’re kind of laughing at that experience, because as you know if you’ve tried to do that, that never happens. What happens is Tableau misclassifies all of your fields. You don’t know how to drag and drop anything. Everything feels broken. And people very regularly revert to that familiarity that comes with using Microsoft Excel.
Well, over the years, I kind of figured out exactly why that experience happens to a lot of companies. And it has to do with the shape of the data, which I’m going to show you next. Most existing Excel reports are going to be laid out something like this, where you’ve got the KPIs going down the first column. And then in an effort to make it easily readable and attempt to show some kind of trend, you might have your dates going from left to right.
And those dates are often not in an actual date format. Well, all of these things are problematic for how Tableau interprets a data source. It needs the fields in the column headers. So right now it thinks that your fields are called Q1, Q2, Q3, Q4. This could even be worse if we had either totals in the columns or totals on the right hand side. All of these things kind of trip up how Tableau prepares a data source for your use.
Ideally, and I don’t have many blanket statements during this course, but this one is probably 95% plus of the time, you’re going to want your data laid out more like this. This is called a tidy format where we’ve got each field as a column header. When your data is set up in this way, every subsequent row becomes a combination of those three column headers that are on the screen right now. That’s what helps you slice and dice everything.
So notice the difference. I know this is a small data set for this example, but instead of having everything go from left to right, I’ve transposed it now so that it’s going from top to bottom. I’ve also changed the date so that it’s in an actual date format. Date is kind of a special data type that allows you to quickly build important chart types, like a line graph. So if you don’t have an actual date, if you’ve got something like Q1, Q2, Q3, I suggest that you just put the first date of that quarter in there as the date. That’s going to make it more flexible and easy for you to build certain chart types.
There are a few topics during this course that deserve a little bit more explanation if this falls onto you. So it deserves more explanation, but it’s not relevant for everybody. So the way that I try to keep the course moving and cover as much as possible that’s relevant for as many people as possible is I will occasionally share a shortened URL. Here’s an example of– this is the first example of that.
If you want more detail on how to actually do this in Tableau Prep, again, I realize that everybody uses Tableau Prep, but if you want to take this course a step further and do some of the data engineering yourself, we do have a tutorial to help you do that. If you go to playfairdata.com/pivot, that will show you how to not only pivot a data set from columns to rows but to unpivot a data set from rows to columns. So you can actually do a double pivot. And it gives you tips on getting the data set in an ideal format for Tableau Desktop.
But this is one of those cases where the Sample-Superstore data set is already kind of laid out perfectly for us. So I’m going to jump back over here to Tableau Desktop. And we’re going to connect to our first table. First thing I’ll point out is this connection type up here. Right now we’re connecting to Microsoft Excel. But you’ll see something very similar regardless of which type of data you’re connecting to.
So even if you’re connecting to something more enterprise level like a SQL server database, you’ll see the name of the database here. And then each table that’s in that database will be available here. So what’s nice about this is even though we’re just using a local Excel file, Tableau is interpreting the whole Excel workbook as a database. And then that Excel file has three tabs inside of it, and it’s interpreting each of those three tabs as a database table.
So if we wanted to get started by just connecting to the Orders table, we’re going to left-click on orders and just drag it into this box that says Drag Tables Here. That’s a first example. I’m kind of laughing, because Tableau is an extremely intuitive software. It doesn’t get much more intuitive than ‘Drag Tables Here’. It is pretty easy to get started with.
I always say that if I just had somebody that knew what they were doing sitting with me for a couple of days and pointing out five or 10 things, it would have made my life so much easier. That learning curve would have been so much shorter. Well, those are the exact five or 10 things that we’re going to cover during this first three hour module. We’re going to build a very strong foundation, help you get started in an intuitive way, and then we’ll keep building and adding tactics to that strong foundation.
But to get started, left-click Orders, drag it into this box that says ‘Drag Tables Here’. There are two different ways to connect to a table. The default is called ‘Live’. It’s exactly what it sounds like. It’s a live connection to the underlying data. There are pros and cons to that. The first big pro is that you always have access to the latest data because it is a live connection. Whatever is in that database, you have access to it. The probably more important benefit, though, is that that live connection is more secure. You had to type in credentials to get there. You’re not actually creating or moving data to a different place. You’re just pointing to it, and it’s already protected or should be at your organization. So it is more secure to use a live connection.
The drawback to a live connection is performance related. Right now we’re connecting to a local Excel file on your own machine that I happen to know has 9,994 rows. We’ll just call that 10,000 from now on. Well, that’s a relatively small data set, and it’s on your own computer, so nobody else is pointing at it. If you’re pointing instead to a very large table on a shared database with maybe 50 people in your organization and the data set, we’ll say, has 10 million rows instead of 10,000, well, now we’re competing for resources and trying to process a larger data set. So it could substantially slow us down. We might have to wait for Tableau to load.
So your alternative is called an ‘Extract’. And you can create an extract just by clicking this button, this radio button. And what an extract does is it creates a snapshot of the data at that point in time. The pros and cons of doing that are essentially the exact opposite of ‘Live’. So to cover the benefit first, it’s going to perform better most of the time because when you create an extract, Tableau creates a local copy in what’s called a hyper format. This is a proprietary data engine that’s unique to Tableau. And that type of data has been optimized for Tableau so that it processes as efficiently as possible. That’s the benefit. It’s performance related.
The drawback is because you’re creating a snapshot at that point in time, you don’t always have access to the latest data until you refresh that extract and add the new data to it. The other drawback to an extract is it’s not quite as secure because you’re literally creating a copy of the data set which you could store on your own computer. You could end up emailing it outside of the company walls. So it’s not as secure.
That being said, I laugh when companies get too stuck on that point, because I typically see hundreds and thousands of Excel files that are floating around organizations. People are emailing them back and forth. It’s the same premise. That data has been saved as its own file that’s on your own laptop. It’s not going to be as secure as a live connection.
A couple other things you can do in this interface before we jump in to the primary interface is you can add Filters. And I do encourage you to do this. One of my biggest tips when you’re using data in Tableau is to limit the data set to only what you need, because that’s going to help it process faster. So if you’re connecting to a table that has 10 years of data but you only need one year of data, just add a filter at this point. You can filter it to just one year. That’s going to create fewer rows, and it should process more efficiently.
You can also change the data type. Each column header has a little blue icon next to it telling you what the data type is. If you see that number sign, that means it is either a ‘Float’ or an ‘Integer’. Integers or whole numbers. Float are numbers with decimal points. That ABC icon indicates that that is a string data type, which you can think of as synonymous with text. That calendar icon tells me that that is a date.
And then this globe icon is kind of unique to Tableau. Geography is not technically a data type, but all these columns have a data type of ‘String’ or ‘Integer’ in the case of a zip code. But they have a geographic role assigned to them. So for example, when I see this country, the data type is ‘String’, but it has a geographic role assigned to it of country. That’s going to help us draw a map.
This is going to be the first time I point out that Tableau you have to remember is just a software. It’s not a human. Some humans coded rules into the software that are very black and white, and those rules are not always perfect. So most of the time Tableau is going to properly classify each of your data fields. But if it gets that wrong ever, there’s an easy fix. Just click on an icon. And there you can see the six different data types that you could change that column to if you need to.
One more thing I’ll point out. We don’t get deep into data engineering in this course. This is a Tableau Desktop course, but this feels like a relevant enough topic. Prior to Tableau 2020.2, when you tried to join an additional table, which you can do by just dragging an extra table into the interface, Tableau would create a I’ll call it a ‘Traditional Join’ where you can do a Left Join, a Right Join, Inner Join. If you’re familiar with that engineering, you’ve heard of those topics.
After 2020.2 and beyond, Tableau now uses a new way to join data that they call ‘Relationships’. And let me do that one more time. I’m going to remove this. And instead of building a Join, Tableau uses what’s called a ‘Noodle’. That orange line that’s moving around there they call a Noodle. And this is supposed to be more intuitive than a Join. They have some logic that’s proprietary to them built into the software to help you do some basic de-duplication. And the relationships between these two tables are now kind of more intuitive. And it attempts to do that work for you. They now call these logical layers.
The traditional join is referred to as a physical layer. If you’re not familiar with this or you don’t trust this or you’re just more comfortable using the traditional joins, you can still access a physical layer by just double clicking on one of those tables. And this is now a physical layer. So if I drag people into this one, I could get a traditional join. But before I mess myself up too much here, I’m actually going to remove this, because I want to start out by just focusing on the Orders table.
So your screen should look like this. If you’re trying to follow along and I went too fast removing it, I’ll show you one more time. Click on the second table and just click Remove. And that will clean that up and then we’re back to just one Orders table.
Once we are ready to start using this data, we will click ‘Go To Worksheet’ at the bottom. We’ll click this not actually on the button, but the orange highlighted sheet, Sheet One. And that will take us into the primary interface, which is called the authoring interface. The reason that I wanted you to follow along and connect to the sample data in a different way is because this is the raw format of that Excel file.
So if you’re connecting to a brand new Excel file for the first time, it will look very similar to this. If I had clicked Sample-Superstore in the bottom of the Connect pane, that data set has already been manipulated and organized to a certain degree. I wanted to get us started right from the beginning and pretend like we’re dealing with a new data set for the first time. So you may never have actually seen the sample data set in this format. This is just all the raw fields. And we’re going to do about a hundred things to these fields.
But before we get started in the main interface, I wanted to talk about a couple of ways that Tableau has classified each of these fields in the sample data set. The first is as a Measure or a Dimension. This is going to feel very elementary to you if you’ve used data before, but this is truly the cornerstone of how to this day I make every single chart in Tableau. So it’s an absolutely critical topic to understand, and I want to provide my take on it.
So first Measures. By default, anything that is quantitative. So any number. Any integer, any float. By default, Tableau is going to assume that that is a measure. Measures are considered dependent, because they don’t really tell you anything on their own. This example on the screen right now, it says $2.3 million. I happen to know that that’s the sum of sales in the Sample-Superstore dataset.
But unless I knew the exact parameters surrounding that, so what is the name of the field, what’s my date range that I’m looking at, which categories am I looking at, that number really is meaningless. That means nothing. If it was $2.3 and that was the current balance of my retirement account, I’d probably feel pretty good right now. If on the other hand sales last quarter were $8.3 million and now we’re at $2.3 million, I’d be feeling pretty bad about it. We just have no idea. That context comes through with the other side of this coin, which is called a Dimension.
By default, Tableau will classify anything that is qualitative. So text based and then date is a little bit of a unique one. But those are going to be classified as Dimensions. Dimensions are considered independent because they come with some inherent information. This example on the screen right now, we’re using a Dimension from the Sample-Superstore data set called Category. And that Category dimension has three things inside of it. Furniture, Office Supplies, and Technology.
By the way, the proper term for those things inside of a Dimension, those are referred to as Dimension Members. But the reason that those Dimension Members are considered independent is they come with information. Somebody in the business at some point had to come along and say these are the products that belong in the Furniture Category, these belong in the Office Supplies Category, these belong in Technology. So while they do provide some information, these two things work best when they are combined together.
We had a Measure of sales. We then broke it down by a Dimension of Category and only now are we able to start to glean some insight from this analysis. We can see things right away, such as Technology is leading the way. Furniture and Office Supplies, they’re kind of neck and neck, but Furniture is second, Office Supplies is third. That insight was made possible by combining measures and Dimensions together.
During this first three hour module, I have 10 rules of thumb. And it’s not a coincidence that this is the very first one, because this, like I said, is truly the cornerstone of how I make every chart. And the Measures are my numbers. I then slice and dice those Measures by the Dimensions, and that’s how we are able to glean insight in Tableau. So Measures are numbers. The Dimensions are what you slice and dice those numbers by to glean insight.
The second way Tableau classifies each field being used is as Discrete or Continuous. This one is a little trickier to wrap your head around, but we will come back to this again and again. It is a primary classification in Tableau. It’s also what controls all of the color coding that you see throughout Tableau. So any time you see a field that is colored blue, that means Tableau is treating that as a Discrete field. It’s called Discrete because when you use it, it draws Discrete headers. So these are unique standalone headers. And those headers can be sorted in either ascending or descending order.
So on the screen right now, I have a measure of sum of sales and I’ve got a Discrete Dimension called ‘Month of Order Date’. And because it’s Discrete, each of those 12 months gets its own header, and then I was able to sort it in descending order. This would be the best option any time you’re trying to do any categorical analysis or trying to make a bar chart. You’re going to want your Dimensional breakdown to be blue or Discrete.
Continuous fields, on the other hand, are color coded green. Anytime you see green, that field is being treated as Continuous. It’s called Continuous because when you use it, it draws continuous axes. Because those axes are continuous, you cannot sort them. So in this example on the screen, I’ve used the same two fields, ‘Sum of Sales’ and ‘Month of Order Date’, but this time my ‘Month of Order Date’ field is green. It’s drawing a continuous x-axis. You cannot sort time. That would be very confusing to read this chart. So it goes in order and you cannot sort it.
It’s also not a coincidence that in both of these first two examples of Discrete versus Continuous that my ‘Sum of Sales’ field is also green, because it is also drawing a continuous axis. It’s drawing a continuous y-axis in this case. You cannot sort that, because again, it would be very confusing if our axis range went from 0 and then it jumped to 50 and then back down to 25 and then up to 125. Those numbers need to go in order in order for us to accurately analyze this visualization.
Again, we’ll come back to that a couple of times. But in short, the rule of thumb here is Discrete fields draw discrete headers. Those headers can be sorted, and those fields will be color coded blue. Continuous fields draw continuous axes. Those fields are going to be color coded green, and you cannot sort them. Cannot sort time. You cannot sort continuous values.
All right. One last thing before we start to actually drag and drop and follow along with each other. I wanted to quickly give you kind of a lay of the land. Tableau has its own language to a certain degree, and so I wanted to share the proper terminology, because that’s the language and terminology I’ll be using for the rest of the course. So first of all, the primary place to get started is this left side. There are two tabs, Data and Analytics.
Most of the work that you’ll do will start on the Data tab, which is referred to as the Data pane. The first thing you’ll see on the Data pane is the data sources that you have connected to. We’ve only connected to one data source so far, so we just see one data source there. It’s the Orders table and the Sample-Superstore data set. You can connect to more than one thing at the same time. If you connect to more than one thing, you will see all of them appear there.
A little bit further down, we’ve got all the fields that have a blue icon next to them. Those fields indicate– so any field above this horizontal rule, Tableau has classified those as Dimensions. So those are qualitative fields. Anything below that line has a green icon next to it, and Tableau has classified those as Measures or quantitative fields.
Probably the most important aspect of this interface is right here, columns and rows. The proper term for those are the Columns shelf and the Rows shelf. Those are called columns and rows because anything you place on the Columns shelf will draw a column on the view. Anything you place on the Row shelf will draw a row on the view. This is one of those things I’m embarrassed how long it took me to realize that. Nobody really told that to me. But once you get a firm grip on that fact that that’s what it’s doing, you’ll be able to draw most charts in Tableau much more easily.
So just to point that out one more time and drive it home, right now we have a Measure called ‘Sum of Sales’ on the Column shelf. So it’s drawing a column on this– this chart is called a scatterplot. It’s drawing a column from top to bottom. Because ‘Sum of Profit’ is on rows, it’s drawing a row from left to right, which is creating our y-axis. It’s these two shelves that control the orientation of every single chart in Tableau.
Probably the second most important aspect of this interface is this area here, which is called the Marks card. This is what allows you to encode the marks on the view. Tableau, if this helps you think of it, you can think of marks as synonymous with data points. So on this scatterplot, we have several hundred circles, and those circles are considered the marks. Anything I do on this Marks card influences those marks or data points on the view. And we’ll get into each of these properties of the Marks card in detail momentarily.
One more important one. This is called the Filter shelf, but any field you put onto the Filter shelf will filter those data points on the view. I’ll point out two more things that will be handy to get started. Once you put a field onto any of these shelves or the Marks card, they inherit this kind of oblong shape. And because of that, the slang term for those fields on the view is called a pill.
So a couple of sentences I might say in Tableau language throughout this course. I might say left-click and drag the Sales field from the Data pane to the Column shelf. That’ll put it here. Or once it’s there, I might say drag this– because it’s now on the view and has that oblong shape, I might say drag the Sales pill over to the color property of the Marks card, and that would be right here.
And then one last item. There’s a dropdown in the top center. Right now by default, it says ‘Standard’. That controls what’s called the fit of the view. Standard will just fill what it thinks is an appropriate amount of space on the View, but there are three other options in that dropdown. You can Fit Width, Fit Height, or Fit the Entire View. Those all do exactly what they sound like. Fit Width fills all the available space from left to right. Fit Height fills all the space from top to bottom. And Entire View fills all the available white space on the view.
You might be thinking, why wouldn’t you just always pick Entire View? It really comes down to the analysis that you’re doing. If you have a bar chart, for example, that has 1,000 bars in it, if you Fit the Entire View, those bars are all going to be scrunched up very close to each other. It’s going to be very hard to analyze the view. That might be a situation where you want to do a Fit Height, which will fill all the white space from top to bottom, but you’ll have a scroll bar from left to right.
There’s also a few things that I like to do with a brand new data set that I’ll share, and then I promise we’re just about to start dragging and dropping and getting some hands on experience with Tableau. So the first thing I like to do is view the data. There’s a couple of ways to do this. We saw a preview of the first 1,000 rows when we were connecting to the data source. If you ever need to get back there, by the way, you simply click this Data Source button in the bottom left corner of the authoring interface. If I click that button, here’s where we started. And here’s where you can see a preview of 1,000 rows and all of your columns. But there’s an easier way to get there.
So I’m going to go back to sheet one. You can simply click this table icon in the top right corner of the Data pane. And that, again, opens a preview. This time it will be 10,000 rows. Our data set has fewer than 10,000 rows. So we’re actually looking at the entire data set here. And I like to do this just to get generally acquainted with the data set, see what are my fields, what are the Dimension Members within Dimensions, what are my date or geography formats. There’s just a lot of useful things that you can glean from looking at this from kind of a 10,000 foot view, just to get some familiarity with it.
If you would prefer to understand more about a specific field, you can right click on the field and click Describe. And that opens a window where you can get some high level information about that field, such as what was the original database name column. So in this one, it was Orders.Category. You can see the role. It’s assigned as a Discrete Dimension. You get some various information about that field. But what I probably find most useful is at the bottom, it says domain. This gives you a preview of the first 20 Dimension Members inside of that Dimension.
This is really useful because without describing the field, if I didn’t know what the Dimension Members were, I would have to drag that field onto the view to let it process and then show me. That’s not a big deal when I’ve only got 10,000 records and I’m working locally, but in a real world scenario where I’m connecting to a database and there’s 50 people on it and it’s 100 million rows, I might have to literally wait here for a minute just to see what the Dimension Members were. So that will also help with your efficiency, because you can get to know these fields without having to process anything on the view.
A couple other things I’d like to do. I mentioned that Tableau is a software. It has black and white rules that classify everything as a Dimension or a Measure. Well, that’s not always perfect, because it’s just going to look at anything that’s a number, throw it down here as a Measure. Anything that is text, it’s going to throw it up here as a Dimension. If you ever need to reclassify a field before you start using it, there’s two ways to do it.
First you can right click on a field. And about halfway down, it says convert to Dimension. You can also just drag the field above that horizontal rule. So discount by default is a Measure. But if I left-click and drag it above the line, it’ll classify it as a Dimension. And there it is now as a Dimension. I’m going to undo just so we’re all looking at the same thing, but that’s how you would reclassify fields if you ever need to.
The best example of that, by the way, in case you’re wondering, is with any type of numerical ID. I like to use the example of Order ID. If I’ve got Order ID number one, Order ID two and three, by default Tableau may classify that as a Measure because it’s quantitative. So another rule of thumb that I have to help me understand if something should be a Dimension or a Measure is I think to myself, would it ever make sense to add this number up? Would that provide any value?
In the case of an Order ID, 1 plus 2 plus 3 to get to 6, that number means nothing to me. That provides no value. Instead I would take a Measure like Sales, break it down by Dimension like Order ID to figure out how much sales I had per order. So that’s telling me that that Order ID, even though it’s numeric and Tableau might classify it as a Measure, I might want to go through those steps I just showed you to reclassify it as a Dimension.
That being said, I learned during writing my last book that Tableau is getting much better at finding those kind of anomalies with how it classifies things. In fact Order ID, I think Tableau is now smart enough to automatically classify that as a Dimension. But just keep an eye on it and know that you can reclassify things that you need to.
All right. Last thing I like to do with a new data set is view the number of records in that data set. Tableau comes with– so every data source that you connect to will come with at least three what are called Generated Fields. They’re called Generated Fields because Tableau generates them for you. They’re not part of your data set. They will be in your data set no matter what, because Tableau adds them for you. Generated Fields are identified with italic lettering. So the three that you will have in every data set, regardless of what’s in the data set, are Measure Names, Measure Values, and then the name of your table.
And then it will say Count in parentheses. If you’re using an older version of Tableau, this used to be called Number of Records. They’ve updated it now to be called the name of your table and then Count in parentheses. You can think of this Orders Count field as Tableau putting the number one on every single row in the data set. So if you were to sum up those ones, you would then be able to know the number of records in the data set.
And that’s the first thing we’re going to do together with our first example of dragging and dropping. I’m going to left-click on the Orders Count field and drag it to the text property of the Marks card and let go. And you should see the answer 9,994. The reason I like to view the number of records with a new data set is twofold.
First, this just acts as a very quick quality assurance check. For example, if I was handed a data set or perhaps I had done a query in some other system and I thought that this data set was going to be 10 million records, let’s say a colleague said, hey, can you point to the Orders table? It has about 10 million records in it. Tell us what you find. If I do this quick quality assurance check and it shows me 10,000 instead of 10 million, there’s something wrong. So I’ll go back to the drawing board.
Either I have the wrong data set or a very likely scenario that happens a lot and it’s kind of hard to figure out what’s wrong, let me show you this again on the screen. If I go back to this Data Source tab, if I added a filter before I jumped into the authoring interface, this is the only indicator that that’s being filtered. There will be a number showing you how many filters are applied. Well, those are easy to forget about.
The example I shared earlier was if I only care about one year of data and my table has 10 years of data, if I put a filter for one year but then next week my stakeholder says, actually we want this to be a five year analysis, well, you’d have to remember that you’ve applied that filter over here as a Data Source Filter. That’s what that is called. So I’d like to do that just as a quick quality assurance check.
The second possibly more important reason is I like to have this number, I won’t say it’s more important, but another reason I like to do this is I like to have this number in the back of my mind while I’m authoring in Tableau, because it has an impact on how efficiently things are going to process. If my whole data set is only 10,000 rows, Tableau can handle that all day with zero issue. And this is another one of those examples that might not always be the case in the real world. Everything we do in the next four days, we’re going to drag and drop and stuff is going to just instantly flash on the screen. And that is mostly true or true most of the time when you’re dealing with fewer than 10,000 records.
But if I did this quick check and it’s 100 million or a billion rows, well, that most likely is going to slow me down, and I’ll know that I might have to wait for it to load and compute and process the answer. Because the number of rows has an effect on how quickly things process, I also have that in mind when I’m writing Calculated Fields. I’ll give you some better and worse ways to write Calculations to make them process as efficiently as possible.
If I’m dealing with 10,000 records, I’m probably not even going to slow down to think about it. I just know that no matter how I write the Calculation, it’s going to process quickly. If it’s a billion rows, I might say, OK, I need to really stop, think through what’s the most elegant way possible to write this formula, because I’m going have to wait for it anyway. So let me make this at least as efficient as it can be to help speed up the processing time.
All right. One more thing I’m going to do before we start following along. Drag Count Orders off of the view just to start over with a clean slate. And we’ve made it to our first chart type, which is the mighty bar chart. This happens to be my favorite chart type to this day. We also have our first example of something that was influenced by William Playfair, which is our company’s namesake. I think of William Playfair as the inventor of data visualization. So any time we see a chart that either he invented or a general data visualization topic, you’ll see credit to Playfair there in the top right corner with his little avatar.
Also as I describe these charts and how to build them, I’m going to start talking in terms of how Tableau identifies whether or not you’ve met the technical criteria to draw that chart type. So here’s our first example. Bar charts are made with 0 or more Dimensions and 1 or more Measures. So let’s think through that and look at the chart that’s on the screen right now. Bar charts are made with 0 or more Dimensions. We currently have 0. That Measure’s not being broken up by anything.
But we did meet that first criterion. So 0 Dimensions and one or more Measures. So at least one Measure. We have a Measure of Sum of Sales on the view right now. So we met the technical criteria. Tableau was able to draw a bar chart, pointing out– and you’re going to hear this quite a few times during the course. Tableau let us draw a bar chart. It doesn’t mean that it’s telling us anything. But we met the technical black and white rules to draw this chart. No insight yet, but that’s what was required. We have our first chart type.
There are at least five ways to create this bar chart. I’ll just show you those over here in Tableau Desktop. First thing you can do is just double click on Sales. Double click. Bar charts are so pervasive. They’re kind of the foundational chart type. By the way, I left out a little history there on bar charts. Bar charts are literally, along with the line graph, the world’s first chart type. Both those charts were released in a book by William Playfair in the year 1786. So these have been with us for more than two centuries, have really withstood the test of time. They’re to this day really the best option for comparing any type of categorical data where you want to take a Measure and then slice and dice it by a Dimension. Always a good place to start.
But back to the five ways. First way is double click on Sales. That adds it to the Row shelf, which creates a y-axis, and we’ve got a bar chart. I could have got to that same exact spot, so I’ll drag that away, by left-clicking on the Sales field and dragging it to Rows. That creates the exact same chart. If you would prefer a x-axis instead of a y-axis, you could just drag Sales from the Row shelf to the Column shelf.
Again, it’s these shelves that control the orientation of every chart. Let me show you that one more time. By default it’s on Rows. So it’s drawing a row from left to right. That creates a y-axis. If I drag Sales up to Columns, it now draws a column for Sales that goes top to bottom, and it’s drawing an x-axis.
A fourth way to create a bar chart is there’s a Swap button is what it’s called. That swaps whatever’s on the shelf with whatever’s on the Column shelf. So if you wanted to just very quickly flip the orientation of a chart, you could just click that button. And then a fifth way to make a bar chart, if you know exactly how a field is spelled, you can just double click on a shelf and type the name. If it turns orange, that means it recognized it as a field in your data set. And from that point, you just click Enter, Enter again, and there is a fifth way to make a bar chart.
This idea that there’s always more than one way to do something in Tableau is so true and pervasive that I have a rule of thumb dedicated to it. And I want to stop here and just point this out that everything I’m sharing is my own habit, my own way of doing it that I’ve developed over the last 10 years. I don’t necessarily think it’s always the exact best possible way to do it. It’s either the way I learned it or the way that I’ve evolved it and it became my own habit. Because there is always more than one way to do the same thing in Tableau.
I always say that the best way to do something in Tableau is the way that you’re comfortable with and then the most important thing is that you’re getting the correct answer. I don’t really care how you get there, because there are going to be multiple paths to get there. I’m going to share my recommendations, but I’ll also try to remember when there’s a popular alternative and point out a various or alternative way to do it.
In that spirit, there is a sixth way to make a bar chart. And this is going to be a introduction to a very important topic in Tableau and data analysis in general called aggregation. So this time, what I’m going to do is right click on the Sales field while I drag it to the Row shelf. And now before Tableau draws anything, it’s giving me an option. And this option is to choose the Aggregation of that field. I think of aggregation as the practice of consolidating several rows into a single row.
The data for this next example does not matter. But to kind of help explain what I’m talking about, I’ve got this fake data set of nine rows of data. And here’s some different ways I could aggregate that data on the right. I know a lot of these look familiar to you from, I don’t know, middle school math. They probably do it in, who knows, kindergarten these days. But if I took those nine rows and I summed them up, I would get the answer of 50.
So again, kind of how my brain thinks about it, I’ve got nine rows. I want to consolidate them into a single value. If I did that by summing the nine rows into a single value, the answer would be 50. If I did an average, that would take the sum of 50 divided by the nine rows to get 5.56. Median is going to be the number right in the middle when these rows are sorted in either ascending or descending order.
These two might be new for you. CNT is short for Count. That’s a count of the values in this data set. There’s nine rows, so we have a count of nine. CNTD is short for Count Distinct. That is showing us the unique values in the data set. So if I’ve got nine total and six distinct, that means that I had a few duplicates. And if I look at the table, sure enough, there’s a couple of fours, three sevens. So I’ve got nine total values, and six of them are distinct or unique. MIN is short for Minimum. That’s the smallest number in the data set. MAX is short for Maximum. That’s the highest number in the data set.
And because I right clicked, I have the ability to choose something other than the default before it draws anything. The default in the Sample-Superstore data set is Sum. But if I click Average and click OK, I’ll get a very different answer. Our Sum of Sales was about $2.3 million. Our Average Sales is just under $230. By right clicking, that was a shortcut.
If you forget that shortcut, you can also change the Aggregation of a Measure once it’s already on the view by clicking into the pill. There’s two ways to click into a pill. You can either right click on it or hover over it and you’ll see a down arrow up here. And if you click that down arrow, it’ll open the same exact menu options. About halfway down those options, it says Measure and then its aggregation will be in parentheses. And if I hover over that, I can make a different selection. So if I’d rather return to Sum, I can click Sum. Now I’m back to that $2.3 million number.
From here I can slice and dice that Measure just to finish the example from when we were looking at Measure versus Dimension. If I left-click and drag Category to Columns, it will take that Sales Measure and break it down by those three Dimensional members. And that’s where we’re starting to glean this insight.
This is a pretty good chart, but I’ll point out a couple of things I might do to it. Kind of in the spirit of when I said there’s always more one way to do something in Tableau, I’m also not that big on quote unquote “best practices,” because I do think there’s many ways to get to the best answer. But I will share the few times that I think there is a best practice, and this is the first of those.
With bar charts, it’s typically good practice to sort them in either ascending or descending order. The reason is now we’re comparing not only the height of these bars, but we’re comparing their rank order from left to right. And you can easily do that with these two buttons. This one will sort them in ascending order. This one will sort them in descending order. So if maybe the heights of the bars are very close together, their sort order will tell me their rank. So I’ll know for sure which one is higher than the other. That’s the benefit there.
I’ve also never loved this default Sheet Title in Tableau. It just says Sheet One. At a minimum, I would like to rename that. But usually I just delete it altogether, particularly when I’m authoring a single worksheet. In both those cases, if I right-click, I’ll get some hints on how to handle that. So for example, if I was new to Tableau and I thought that’s an ugly sheet title. How do I get rid of that? I’ll right-click on it, and usually you get some clues about what to do next. I can edit the title. That was one option. Or I can hide the title all together.
And this one is kind of tongue in cheek of a rule of thumb, but this really does happen so often that I’ve got a rule of thumb just for this one topic. If you ever get stuck in Tableau and you don’t know what to do next, it really is amazing how often you can just right-click on what you’re not sure of, and usually you get some clues about what to do next. This is true of hiding sheet titles like I just showed you. It’s true for formatting. It’s true for axes. Give you a couple more examples over here. If I wanted to change the format of this chart, right-click somewhere in the chat. There is a clue. I can format it. If I don’t like the axis, I can right click on the axis. The very first option is Edit Axis. So it really is amazing how far you can get just by right clicking in the interface and get some clues about what to do next.
All right. Moving on to– oh, let me not show you that yet. We’ve made it to our first exercise. I thought I was going to show you encoding. But first we’re going to start with our very first exercise. Again, the format of these exercises is I will give you two to ten minutes, depending on the complexity. I’ll come back, show you how to make it the way that I would do it, and then we’ll keep moving. This first one I hope is more like a two minute variety. This should be very basic. But it’s going to lay the foundation and we’re going to keep building and adding new topics.
So the first one we’re going to build is this bar chart on the screen. A couple of things I’ll point out about it. First of all, if you start with the Measure, like I like to do because of rule of thumb number one, we’re using Average Profit. If you ever see an aggregation on the axis, that means that it’s being aggregated as something other than the default. So take note of that. It’s Average Profit as the Measure. And I’m breaking it down by the Region Dimension. Region is drawing rows on the view, which is a hint on where to put that Region Dimension.
And then a couple other small things to clean it up. It’s sorted in descending order if you can remember to do that. And let’s see. There’s dollar formatting. Don’t worry about that if you don’t see dollar sign. Don’t worry about that formatting. I’ll explain that in a moment. But see if you can match this. The other thing to do is you might want to change the Fit of the View. By default these bars are all going to be squeezed very close to the top of the view. Click where it says Standard and choose something different to give those bars more breathing room. Give you about two minutes from here, jump back in, show you how to do it, and then we’ll keep moving.
All right. Let me show you how I would have gone about this exercise. So first I’m just going to start all over. I’m going to clean the slate here by dragging everything I had off of the view. And how I would approach this first one, I always start with my Measure. So I’m looking for the Measure. It’s called Average Profit. And I can also see that Average Profit is drawing a column or an x-axis on the view. That’s a hint that I need to put Average Profit onto the Columns shelf.
Because I see that the aggregation is something other than the default, I’ll also take note that it’s Average. And I know that shortcut that I can use, which is to right click while I drag it to the Column shelf, which will allow me to choose Average before it draws anything. So that’s what I would do first. Right-click Profit while I drag it to Columns. When I let go, it will give me the option to choose Average. Click OK. And our Measure is now on the view.
That Average Profit Measure is then broken down by the Region Dimension, and the regions are drawing roads, which is another big hint that I will put the Region Dimension onto the Rows shelf. And then those last couple of things I mentioned for best practice. One of the few that I will share and I do think is a best practice. I’ll click this Sort Descending button to put those bars into descending order. And I will change the Fit of the View from Standard, which is squeezing those bars at the top, to Entire View, which will spread those bars out. And we’ve got our first bar chart.
We’re now going to build onto that bar chart and encode those values it’s called. And we can do this via the Marks card. I’m going to go through the first four out of five of these Marks cards, and we’ll come back to the fifth in a moment. First starting with Color. There’s two ways to use this Color property of the Marks card. First if I click Color, I can change the color of all the marks at the same time. So if, for example, I like orange instead of blue, I click orange. All four bars change to a different color.
I can also change the color based on either a Discrete Dimension or a Continuous Measure. So maybe I’ll drag Region to Color to show you the first example. And now in addition to having a row for each region, each of the four regions has a color, a discrete color. And speaking of that, this is another consequence of this pill being green or blue. Because this is blue and it’s discrete, this first type of color legend is called a Discrete Color Palette. The proper term is actually Regular, but think of this as a Discrete Color Palette, because there’s four discrete or unique colors on it.
If I drag Region away and this time drag Sales to Color, we see a different type of color legend. Because this is green, this is called an Ordered Sequential Color Palette. It’s going in a sequential order from left to right with one color on the end of the spectrum and then lighter colors as you move down and to the left. Right now what that’s being used to show us is the higher the sales, the darker the blue. The lower the sales, the lighter the blue.
There’s one more type of color legend that can appear. If you’ve got both positive and negative values, you can see an Ordered Diverging Color Palette where you have not only one color on the end of the spectrum, but you have a color on both ends of the spectrum. You could think of this with profit. If you’ve got numbers less than 0, you can color those red. And if they’re above 0, you can color them blue, as just one example.
I’m going to drag that away and next show you the Size property of the Marks card, which acts very similarly to the Color property. If I click Size, the first thing I can do is drag this slider from left to right, which will change the size of all the marks at the same time. If you don’t care exactly what size to make these marks, there’s a small tick mark right in the middle. That’s usually a good place to aim for, and Tableau kind of snaps to those guides. So that’s a little bit of an easy pick if you don’t have a strong preference.
But you can also size marks, again, by either Discrete Dimensions or Continuous Measures. So if I drag Region to Size, now not only do I have a row for each region, but I have a discrete size over here. And this is the first time I’ll point out, first of several times during the training, that Tableau definitely allows you to do things that you should not do. In my opinion, adding the Region Dimension to the Size property just made this even harder to read because our user now is looking at the rows but then wondering, what does that size indicate? And then they have to look at this legend and there’s not much rhyme or reason on what size is being assigned. I actually think it’s purely alphabetical. So because C is the first letter here, it got the small size. So not much value there.
But you can also Size marks by Continuous Measures. I’ll drag Sales to Size this time. Again, this one’s not super intuitive, but I do use the Size property when I’m using charts like a scatterplot where you want to make the circles larger or smaller. This is how you would do that. You would put a Continuous field onto the Size property of the Marks card.
The next property is called Label. This controls what is being shown on the marks. The first option that you have is to click on the Label property and just check this box to Show Mark Labels. By default, this will show the number on the y-axis. I’m sorry, not just y-axis, but any of the numerical axes. So I click Show Mark Labels. We have one x-axis right now, Average Profit. So that’s what showed up as my labels.
But you can customize that card as well. Maybe instead of Average Profit, I’d rather see Sum of Sales. So I’ll drag Sum of Sales to Label. And you can see that number is now showing me Sum of Sales. I can also put more than one thing on Label. If I’d also like to see Sum of Profit, I’ll drag Profit to Label. Now I have two numbers. Those numbers aren’t very intuitive. I don’t know what each one indicates.
So one more thing you can do for Labels is once you’ve dragged an item to the Label property, if you click on it again, you’ll now have the ability to click this ellipsis. That was not available to us before when there was nothing on that property. But now because we’ve got two fields on that property, I can click this ellipsis and customize the labels. This opens up a very flexible word processor.
The gray shading indicates that the value will be dynamic or different per mark. But you can also type in static text into this box. So maybe after Sales, I’ll just type sales, and after Profit, I’ll type profit. If you ever see the Apply button in Tableau, you can preview the change before you accept it. I’ll click Apply just to see what happens. It’s looking good.
Just one more thing I’ll point out on those labels. Notice again the gray shading indicates the labels that will be dynamic. We’ll see a different value per mark. The words or text without gray shading are static. Notice on the labels in the background that those show up on every mark and they look exactly the same on every mark. They’re static. Click OK.
And I’m going to skip to the Tooltip property. But Tooltips are similar to Labels but Tooltips are the information that appears when you hover over a mark. So I hope this is obvious, but the choice on whether you use a Label or a Tooltip comes down to how you plan to distribute the dashboard that you’re building. If you’re building something that’s going to be interactive and people can hover over it, I would probably suggest providing the information via a Tooltip because that’s going to save you real estate and it’ll be a better experience for them. If, however, you’re going to print out these dashboards or take a screenshot, put it in an email so the user cannot interact, obviously they won’t be able to hover over and see that Tooltip. So I might provide the information via a Label.
Tooltips, just like Labels, can be customized. If I click Tooltip, I can get in there into this word processor and use a mix of static and dynamic text. Also like Labels, it’s using whatever is on the view by default. So notice when I hover over a mark, I see for things currently. That’s because there are four fields on the view. If I wanted to add a couple of things like Average Discount to Tooltip and Sum of Quantity to Tooltip, now there are six things on the Tooltip.
All right. You can take the encoding really far. So I did want to point out probably my first controversial suggestion. And we got Playfair back here, because this is a general data visualization theme. But this chart right here is kind of what I see a lot of times or a chart that’s very similar when people start using Tableau and putting things on the Marks card and encoding those. It’s not terrible, but there’s a couple of things I would say about this that I would consider to be called Double Encoding, meaning we’ve already encoded the data and the information, and we’re already communicating a certain attribute of the data. But then we’ve layered on and recreated the same type of encoding.
For example, we already have a row for each of my four regions. We don’t then technically need also a color for each of the four regions. There’s this concept in data visualization called Cognitive Load. I think of that as synonymous with how efficiently does my user process a visual. We want to reduce that Cognitive Load on them and make it as quick as possible for them to process whatever is on the screen. In the case of this first example with the color encoding, we already provided the information. It’s already on the rows. This would actually slow the user down or increase the Cognitive Load, because now they’d have to look back and forth to the color legend to make sure the color meant the same thing as the rows.
The other one I’m not quite as steadfast on, but there’s one more subtle Double Encoding happening where because I added Average Profit to the Labels in this example, we’re doing what’s called Direct Labeling where the number is directly on its mark. And when that is the case, this axis is technically Double Encoding. It’s not really providing any extra value. The range is already on the label itself. The exact values are already on the label itself. So I would probably just hide that axis if I’m going to go with Direct Labeling.
And then so if I follow those rules, I would end up with this, which is much more minimalist. It’s straight to the point. This is going to be the most efficient way to communicate this data possible. One giant caveat to this suggestion. If I am making this chart in a vacuum, so maybe I just want to make this analysis, take a screenshot of it, put it in an email, I would go with the one on the right side all day. That’s going to be the best option.
If, however, starting on Wednesday we’re going to combine multiple charts into a single dashboard, the color in that case, if we’re encoding marks in the same way across multiple sheets, that’s actually going to help our user make associations between those sheets and in that case improve the Cognitive Load. So quick rule of thumb, another one that’s not documented. If you’re building it in a vacuum, one single chart, avoid any double encoding that you possibly can. If you’re using that extra encoding to help make associations between multiple charts on one dashboard, I find that to be actually good, because it’s going to improve the Cognitive Load on your user.
All right. We’ve made our first sheet, so we’re going to give this a name. To do that, the best way is just to double click on the sheet. You’ll see this blue highlight appear. And you can just type over it. So we’ll call that Bar Chart. I do encourage you to follow along and name sheets, because by the end of this course, you’ll have probably 50 different sheets, lots of different calculations, a dashboard, and you can use this workbook itself as a learning resource. So I definitely encourage you to follow along and go ahead and name that sheet.
I’m also going to show you a couple of different ways to save this file locally. That way you can continue to follow along should you want to look back and use this workbook as a resource. So first thing, this is optional. We connected to this data set as Live because it’s only 10,000 rows. It’s a file that’s on all of our machines. So that was a perfectly acceptable choice.
If you’re wanting to distribute this workbook to someone else and you need to package the data, there’s one extra step that you need to take. I’m not going to do it now and you don’t need to do this. Is more for your day job. If you ever need to extract data, you’d go to Data in the top menu, hover over the name of the data set, and choose Extract Data. That will package the data or take a snapshot of it.
And again, this is only if you need to do this. If you’re eventually going to publish this to Tableau Server and all of your users have credentials and can access the data via the Server, you will not need to do this. But if you need to package a data set locally so that you can send it to somebody, this is the extra step to do that. Data, hover over the data set, Extract Data.
Then there are two ways to save a Tableau workbook. The default is much like most software programs where I can just click File and Save As or Save if I’ve already got a file going. That will save this workbook with the extension .twb. That stands for Tableau Workbook. But very important to note this. A Tableau workbook is purely the instructions on how to visualize a data set. It does not come with any data inside of it.
So the reason that’s important to know is if you send a TWB file to a colleague that doesn’t have access to the data, Tableau’s going to give them an error message. It’s going to say I don’t know where this data set is. I’ve got the instructions for how to visualize it, but I don’t have the data. So they’ll just get an error message. If you want to package the data with the instructions on how to visualize it, there’s a option a little bit further down called Packaged Workbook. So you would export a packaged workbook. Those files end with the extension .twbx. It’s that X at the end that indicates it is a Package Workbook, packaging the data with the instructions.