Transcription
[Music] Welcome to LearnIt Training. The exercise files for today's course are located in the video description below. Don't forget to like and subscribe.
Welcome everyone. I'm Trish Connor, and this is Tableau Introduction. Tableau is a visual analytics platform that makes it easier for people to explore and manage data and faster to discover and share insights that can change businesses. It helps people and organizations be more data-driven. Tableau supports data prep, analysis, governance, collaboration, and more. This Tableau basic training course is designed as an introduction to Tableau for beginners. On completing the course, students will have a firm grasp of the basic techniques required to create visualizations and combine them in interactive dashboards. Specifically, students will meet the following learning outcomes, among others: creating foundational to advance VIs (visualizations) and working with data in Tableau.
Thank you for viewing this Tableau introductory course. Module one covers creating your first visualizations and dashboard. In this module, we'll be getting right to work, diving in headfirst to Tableau by connecting to an Access database, creating visualizations, and ending with creating a dashboard. Think of this module as a hands-on opportunity to learn how easy it is to get from accessing data to creating dashboards in Tableau, and we'll fill in all the pertinent details in subsequent modules. So this module has three lessons. The first lesson is connecting to data in Access, and we're going to use a database named Northwind that is in the files in the video description. So you might want to go ahead and grab that file and move it somewhere onto your system where you can easily access it. Our second lesson will cover the foundations for building visualizations, and the third lesson will bring everything together in a dashboard.
Now, before we get hands-on, there are a few other things I want to review with you before we get started, and this PowerPoint presentation is in the files in the video description as well, for your future reference. So before we get into Tableau, it's important that you understand the interfaces that you're going to be working in. So again, you'll have these slides for future reference, and I'll remind you of these things when we get into Tableau. But the first thing I'd like us to take a look at is the data source view. So you'll get to this view once you connect to a data source. Now, the picture on this screen is from an Excel file, right, and you can see that on the left side it is known as the left pane. At the top of the left pane, it's telling you, underneath Connections, the name of the file and the type of file it is. So this is a sample Superstore file; that's an Excel file. Because it's an Excel file, it's showing you, underneath Sheets, all of the sheets that are in the worksheets that are in that Excel file.
The next thing you'll see is at the top of the screen. Now, this is when you first go in; this is a blank area. It's called your Relationships canvas; it's also known as the Logical layer. On the canvas, and we'll dive into that a little bit more in a moment, but you're seeing the tables and their relationships in the canvas. If I double-click on any of those tables in this canvas, it opens up the Joins canvas, which is here (letter C), and we'll talk about that in more details in a little bit—actually, very shortly, once we get into Tableau. On the bottom half of the screen, in the background, you're seeing the data grid. And so, when you have your tables up at the top, you can see the data that's in those tables in the data grid. And if you want to explore any metadata, there is also a metadata grid that can be accessed, and I'm pointing to that one now. So that red arrow is pointing to the metadata grid, and then I'll draw another red arrow that's pointing to the data grid. So all of these things aren't open at the same time, but this is just a view for you to reference when you're working in the application.
So I talked about the Relationships canvas and the Join canvas. Well, this is a further breakdown of that. So the canvas has two layers: the default layer when you go onto the data source page is the Relationships canvas, and you combine data in that layer using relationships. And then the physical layer, which you get by double-clicking on an object in the logical layer, you can use the combine data between Tables by using joins and unions. Each logical table contains at least one physical table, which you'll see when we get into Tableau. And again, the physical layer is also known as the Join Canvas OR Join Slun canvas. You'll see this when we get into Tableau. And the last slide before we get hands-on is showing you the breakdown of Sheet view in Tableau. So all the way at the top, you'll have the workbook name, which currently shows Book1, as you can see in the upper left-hand corner there, and it's marked with the letter A above it. So it's just saying Book1 up there, and then the letter B are known as cards and shelves. So this panel here on the left, where it's saying Pages, Filters, so on and so forth, those are cards; and then where it says Columns and Rows, where you have some of these fields that have been dragged in there, and those are shelves. You have a toolbar at the top, and that's under your letter C there. So you have a little bit of a toolbar running right underneath your menu bar. And then the letter D is your view, and that's your canvas where you will create a visualization. This area right here—there is a little button all the way to the left of the toolbar; it's letter E—and that will take you to the start page, the very opening page when you get into Tableau. If you need to get back to that start page, that's the way to do it, by using that icon on the far left of the toolbar. Letter F is showing you the sidebar; this is on your left side, right? The sidebar is showing you what you're looking at here; this is the Orders table from Sample Superstore, or Orders from Sample Superstore, and that's what it's saying there (letter F). And then letter G is at the bottom, and that's the Data Source tab. So if you notice, to the right of that, we're on Sheet1, and that's why we're seeing this view. If we want to get back to Data Source sheet, we can—or tab—we can use that Data Source tab button there, and that will take you back where you can see the Grid View and all of that stuff. Underneath all of that, the gray band running across the bottom is your status bar, like it's in pretty much in every other Windows application; you'll find a status bar at the bottom in the gray band. And the status bar is just giving you information, and then you have—like I said—we're on Sheet1, and to the right of that you have these little icons that you can create new sheets, new dashboards, new stories. And again, I'll remind you of this when we get hands-on, which we're going to do right now.
So now I'm on my desktop, and I'm going to show you how to launch Tableau. Um, we're going to set it up so it'll be easier access for you going forward. So what I'm going to do is I'm using Windows 11 here. What I'm going to do is I'm going to go to Start, or I could go to Search; I'll go to Start because this is kind of way cool—and I'm going to just do All apps at the top, and then I'm going to click on the letter A, so it collapses the alphabet, and then I can choose the letter T for Tableau. And when I get to Tableau, I'm not going to click on it; that will launch it. I'm going to right-click on it, and I'm going to hover over More, and I'm going to pin it to my taskbar. So now, if you notice—and I'm going to click away from that—so when my taskbar is displayed, lingering at the bottom, the last icon on the right is Tableau, and I'm going to go ahead and click that icon to launch the application. When you launch Tableau, it opens on the home screen, where it gives you the ability on the left to connect to a variety of different data sources. So you can search for data on Tableau Server; you can open a file here; you can go to the server to get other types of databases; and then you have—when you download Tableau—you get a couple of saved data sources there, one of which is Sample Superstore; the other is World Indicators. On the right side of the screen, at the top, you can open a workbook as well from there, and then you have Accelerators at the bottom. Accelerators are pre-built dashboards that you can use, and you can swap out the data that comes with them with your data, just to give you a jump start if necessary. And you have the ability to access more Accelerators on the right side. On the left side, what we're going to do is, under the (2A) File section, we're going to select Microsoft Access, and then you're going to browse to wherever you put that Northwind file, and you're going to double-click it. Now, that Northwind file doesn't require a password; there's no Workgroup Security, so we can simply just click Open.
So once you connect to your data, it takes you to Data Source view. If you look down at the bottom of your screen, you'll notice that the Data Source tab is the active tab, indicating you're in Data Source view. In your left pane, you're seeing the name of your database as well as the source, Microsoft Access, underneath Connections. And then, instead of seeing Sheets like we have in the PowerPoint, you're seeing the tables that are in that database. And if necessary, you can use the Add button to add more connections to your Data Source if necessary. What we're going to do is we're going to start dragging tables. So we want to find the Orders table in the list in the left pane, click and hold on it, and drag it onto the canvas. And you'll notice quite a few things have changed. So right now, it's letting you know that you're on the Orders table from the Northwind database. At the top, it has—if you hover over the Orders table instance there—it lets you know that it's a logical table and that you can double-click it to see its physical table. So let's go ahead and double-click Orders, and we're just seeing the physical table at this point. And to go back to our initial view, over in the upper right-hand corner, you're going to go ahead and click on the X to close the physical layer and get back to the logical layer. It also has, in the upper right, it defaults to a live connection versus an extract, and we'll talk about that in the next module. And then you—it says—you have zero filters, and you can add filters there; we'll talk about that separately as well.
So I want to show you what can happen if you drag another table to this logical level here. Remember, this is the Relationships canvas. So if I go to drag—look for the Order Details Extended table—and drag that onto the canvas, and you'll notice the little noodle line as you're dragging it; it's showing there's a relationship between those tables, but when you let it go, you get this error message: says the data source uses a connection that doesn't support multiple logical tables, blah, blah, blah. So instead of reading all of this, I'm going to just close the error message and show you how we're going to get our other tables in. So it won't let us put them at the Logical level. And before we do this, by the way, let's talk about the Grid at the bottom. So you're seeing on the left side of the grid, you're seeing a list of all of the fields in the Order table—in the Orders table—and their types. Uh, the pound sign or hashtag represents a numeric data type, and you'll have some dates; it looks like a calendar; and then you'll see an ABC, which means it's a text data type, and you'll see those symbols repeated. It's showing you all of the information that's in that Orders table—at least 48 rows of it here, right—which is all it has; it's 20 fields and 48 rows; it's telling you right there—and you can scroll down to see the rest of your rows and so on and so forth. So now we're going to double-click on that Orders table in the upper half to get back into the Join or Union layer. And now I'd like you to take Order Details Extended and drag it there, into that canvas. And so now it's showing the join between the tables, and the join represents how the tables are connected to each other. And so in this—and you'll learn more details about joins in the next module—but for right now, if you click—if you hover over that join between the two tables up there—it is say Inner Join of Orders and Order Details Extended; underneath that says Order ID equals Order ID. So there has to be a common field between the two tables to join them, and an inner join is telling you that it's only showing orders that have extended order details. If there are orders in there without order details, they will not be showing down in this grid. And now that we've joined the tables like this, if you look in your grid, you'll see that you're getting fields from the Orders table, right? And if I scroll across to the right, then you'll see the fields—the matching fields—for those particular orders from the Order Details Extended table. So joining actually combines data between two tables; relationships do not, and you'll learn more about that, like I said, a little bit later on. Go ahead and drag the Customers table and the Sales Analysis tables into the view. So notice at the top, above your Orders table, it says Orders is made of four tables: we have the Orders table itself, and then we have the related or joined tables: Customers, Order Details Extended, and Sales Analysis. So now that we have our tables in, we can go ahead and close the physical layer by, again, using the X, and you'll notice when we come back to the logical layer it shows that it's has joined tables. If they're not showing here, that means you need to double-click that to see them. So it's showing you the logical tables on that popup and the physical tables on that popup, and again you can double-click it to see its physical tables. So out here in this view, right, if you notice something changed, we now have 69 fields in 234 rows because we added other tables. And you can also—remember—to scroll across to see the other table fields that are in there, and it just goes all the way over to the right. Now, if you want to see more of your data, you can put your mouse between the upper part of the canvas and your grid on the lower half, click and hold, and you can drag up so you can see more rows of your data; scroll down. So now it's showing 100 rows at a time; I can tell that by looking up here in the upper right-hand corner; it's telling me that it's showing 100 rows. I can do the right arrow next to it to see the next 100 rows, so on and so forth. I can change the number of rows that it's showing if I want to. To the right of the Rows, you have a gear icon, and if you click on that, it gives you some sorting ability and some other options there. And if you go to the drop-down arrow to the right of that gear, it collapses the grid, and then it turns into an up arrow, which I can click to expand and show the grid again.
Now we're ready to go to Sheet view. So right next to your Data Source tab at the bottom of your screen, go ahead and click on Sheet1, and now you're in Sheet view. And just so you know, instead of being called the left pane in Sheet view, it's called the sidebar, and you have your Data tab at the top, and you also have an Analytics tab. Go ahead and click on the Analytics tab. Everything is dimmed out right now; we're not going to do any analytics in this module. Go back to the Data tab. We will get into analytics later in the course. In that sidebar, on the Data tab, you have a list of all your tables and all of the fields in every table, and it also shows you whether it's a text field, whether it's a geographic field, whether it's a numeric field in front of the field name. If you scroll down in that sidebar, underneath the Sales Analysis table and its Fields, you'll see Measure Names. Any numeric field that's in your data source will automatically be converted to a measure in Tableau. So, for example, the Unit Price field from the Order Details Extended table, when we use it in our VI—if we were to use it in a visualization—it would automatically do the sum of the Unit Price. So I'm going to scroll back up to the top, and we'll choose the fields that we want for our first visualization here. The first field we're going to use is from the Orders table, and we're going to drag it to our Columns shelf. So I'm going to use—and it's going to be the Order Date field—so I'm going to click and hold on Order Date, and I'm going to just drag it up to the Columns shelf, right underneath your toolbar. And when I drop it there, a couple of things happened: it automatically puts it in as just the year of the Order Date, and it starts building the information right here on this canvas. It also selects, right now, um, the recommended—it's like a text—like a table visualization right now, and that pane starts lighting up. The next thing we're going to do—we have our year of Order Date—and we want the Ship State/Province to be in our Rows. So Ship State/Province is also in the Orders table. I'm going to click and hold and drag it and drop it in my Rows shelf. So it wants to do a table here, but I don't want this to be a table; I want it to be a map, since we have geographical data in it; we can convert it to a map. So what I'm going to do is, in my Visualizations panel on the right-hand side, I'm going to hover over—and you can see—I'll point it—I'll do an arrow pointing to the one I want; it's just a plain map—so I'm going to select that map, and it converts the table into a map. And notice now it says Longitude Generated and Latitude Generated; one is in Row, one is in Columns, but it took out that State/Province because it converted it so it can be shown as geographical data on the map. So that's what it does there. So on this particular map, we just have the states that have orders, basically, and they're highlighted; they're shaded on the map. And what we're going to do is, up at the top of your map, where it says Sheet1, you're going to double-click that; we want to rename that. So I'm going to just select that sheet name placeholder; it's going to name it whatever the name of the sheet is initially. I'm going to just type Order Map and Apply. So it changed it there, and I'm going to click OK to cancel that edit title box, and then I'm going to double-click on the sheet—Sheet1—and I'm going to just name it Map. Now we're going to create another sheet and place another viz on it. So to the right of your Map sheet tab, you're going to click the—the plus sign—the first plus sign; it gives you a Sheet2. And on this sheet, we're going to drag Order Date to the Column shelf again, and we don't want the year of the Order Date for this one; we want the actual date. We're going to do the drop-down arrow. If you hover over that Year Order Date, you'll see a drop-down arrow to its right. We're going to click the drop-down arrow, and in our list here, you'll notice it has Year selected, right? What we're going to do is we're going to go down in the list, and we're going to select Day. So not in the upper list, but in the lower list. So you have Year, Quarter, Month, Day, and more; and then you have Year, Quarter, Month, Week Number, Day, and more. In the Year, Quarter, Month, Week Number—that's the Day we want—it's going to actually show the full date—day of—of order—well, not the full date, but it's going to show—they're all in 2006—it's going to show the month and the day, which is what we want.
And then what we're going to do is we're going to scroll all the way down on the left; we're looking at our measure name. So there's a measure named Sales under Sales Analysis, and we're going to drag that to Rows. It makes it the sum of Sales because it's a measure, so now we have the sum of Sales by date. And what we can do is you can hover over any point on your line graph, and you can see the day of the order date as well as the amount of sales on that date. We connected to an access data source; we chose the tables that we wanted, and then we went to the first sheet, chose some fields from the tables, and made a map out of it. Now we're on our second sheet, and we made a line graph out of the data that we chose.
So up at the top where it has the title of the map, we're going to click there—where double click—where it says Sheet 2, not the title of the map, the title of the line graph—and we're going to select that sheet name placeholder, and we're going to name it Sales Amounts by Date, and we're going to apply and okay. And then we're going to double-click our Sheet 2 tab, and we're going to rename that just Sales for now.
Now that we have two visualizations created, we are going to create a dashboard, which allows you to see several views at the same time. So each of these sheets—our app sheet and our Sales sheet—are two different views; we're going to combine them into a dashboard. So to the right of your Sales sheet tab this time, I'm going to have you right-click on the plus sign and choose New Dashboard. And you'll notice on the left side it just shows the sheets that are in this file. So the first thing we're going to do is we're going to just click and hold on the map sheet and drag it into the view, and then we're going to click and hold on the Sales sheet and drag that into the view.
Now I want my map to be on the top of the view, and I want my Sales Amounts by Dates to be on the bottom. So I'm going to hover over the map portion and click on it. At the top, you'll see that little gray band with white lines; if you put your your mouse on that, it changes to a four-headed arrow. You're going to click and hold, and then you're going to just point to the top of the view, and it will drop the map at the top and move your line chart to the bottom.
Now here we can add filters to our two different viz visualizations—rather, I was trying to say vizes and went for visualizations—and the way to do that is for the map, I'm going to hover over the map, and you'll see on the right you have the X to remove it from the dashboard; you have the second icon down is go to the sheet where it resides; third one is used as filter; and the bottom one is more options. So we're going to click that more options down arrow; we're going to hover over Filters, and we're going to choose from the list Ship State Province. And it creates a filter, a visible filter, where you're seeing all of the states that are highlighted in the map, all of the states that have sales from our data, and you can use that filter. So it defaults to All; I'm going to go ahead and uncheck All, and the entire map disappears, and then I'm going to just check New York, and so it zooms in with New York State highlighted. I'm going to go ahead and check All again.
And then for our Sales Amount as Dates visualization, we're going to select it, go to the more options drop-down arrow, hover over Filters, and we're going to do Day of Order Date there. So it gives me the range of order dates; you can see January 15th through June 23rd, 2006. I can click on a date there, or I can use the slider. If I use the slider, now you notice the chart, the line chart updated, because now it's showing March 6th through June 23rd, and I'm going to slide it all the way back to January 15th. Now let's say I wanted to see from January 15th to February 15th; what I would do is I would click on the last date; it brings up the mini calendar, and I just do my back arrow till I get to February and choose the 15th, and notice that that line chart updated again, and I'm going to expand it by using the slider so it's showing all of the dates again.
Now the cool thing you can do here is you can use one of these as a filter itself. We're going to use the map visualization as a filter. So what we're going to do for that one is go back and select your map visualization, go to your more options dropdown, and choose Use as a Filter. Now what does that do? That kind of relates the two of them together, meaning the two different visualizations; if I click on New York on the map, the bottom line chart is now just showing the sales of date amounts by date for New York. If I click on New York again, it gives me the full scheme of things. Let's take a look at California; click California on the map; California sales are steadily going up, and we can click California on the map again to get our full chart back.
The last thing we're going to do here is we're going to rename our dashboard sheet tab. So I'm going to just double-click; it says Dashboard 1, and we're going to say Map and Sales Amounts by Date, and press Enter to just save that as the name. And it would probably be a good idea to save our file now, so we're going to go to the File tab, and we're going to choose Save, and it's going to save it locally on your computer. Now it should be in your Documents, My Tableau Repository, and in Workbooks subfolder, and notice it's a Tableau workbook; it has a .twb extension, and we're going to call this Sales Data from Access and save it. So it updates the workbook name at the top, and we're going to go back to the File tab and Close, so it leaves you on the home screen.
So we've completed the first module where you got your feet wet, so to speak, and we ended up creating your first visualization and dashboard. We started with a brief review of the home screen where you can select the type of data source you want to connect to, open an existing Tableau workbook, connect to a few Tableau built-in data sources, or use an accelerator, which is like a pre-built dashboard. We connected it to a Microsoft Access database and reviewed the data source view interface where you can see details about your data in the left pane. You learned that this view initially displays the relationships canvas, also known as The Logical layer of the view, where table relationships can be created. You learned how to switch to the joins SL unions canvas, also known as the physical layer of the view, which is used to join tables. You'll learn more about relationships and joins as this course proceeds. We added database tables to The View and reviewed table data in the data grid and also viewed the metadata grid. We then moved to sheet view where you're able to see the fields in the tables and build visualizations. We explored the interface and then created a map viz. We went to another sheet and created a line chart viz. We moved on to explore creating a basic dashboard with some interactivity, and we saved the Tableau file locally and closed the file to end this module.
Module two is all about working with data in Tableau. We have six lessons in this module, as you can see on the slide. The first lesson is very brief; um, it's just a slide; it's giving you some background on how Tableau works by showing you what's known as the Tableau Paradigm. In lesson two, we're going to start connecting to data again, and we're going to use some Tableau sample store data. Lesson three, you're going to learn about the difference between working with extracts versus Live Connections. The next lesson we'll talk a little bit more about metadata, and I'll show you how to share your data source connections. Lesson five is about joins and blends, and for that lesson we're going to be using two files—there CSV files from the video description—Orders and Order Payments. And then we'll end this module by learning how to filter data.
So the Tableau Paradigm—what is it? It's the experience of working in Tableau as a result of viz ql, which is visual query language. It allows Tableau to translate your actions as you drag and drop fields of data into a query language that defines how the data encodes those visual elements. That's a mouthful. There's a little bit of a diagram there, um, showing how you go from Tableau to your data source. You connect to your data source on the left side, and that's when viz ql kicks in, and then from the data source back to Tableau, you're getting the aggregated results. Simply put, the Tableau Paradigm is how Tableau works with the data as you're dragging and dropping fields. I have a couple of slides that will give you some definitions that you will find useful in this module.
So we will work with extracts in this module, and extracts are static data; it's a snapshot of data based on criteria you select when you're working with extracts and Tableau. If the original data source gets updated, your data in Tableau will not automatically update; you would have to refresh the extract to get the most current data. Now that's versus working with a live connection. By default, when you go into Tableau, it's set for you to be working with a live connection, and that is based on the most current data available. As data from your data source is updated, your Tableau data will update automatically when you're using a live connection.
Now we briefly looked at metadata in the first module, so Tableau facilitates in capturing the information details of the sources like columns and their data types, and metadata is used to create the dimensions, measures, and calculated fields used in views. And metadata can also be edited. We're going to talk about relationships, joins, and blends in this module—well, actually we're not going to really create any relationships, but you will see some, so it's worth getting a definition. Relationships are created between tables based on a common field; it doesn't merge the table data together; it keeps it separate, but it just is indicative that there is a common field that somehow relates one table to another. Then we have joins and blends, which we are going to create in in this module. Joins are an approach to merge data from the same source, also based on a common field like a relationship. Joins will combine the data and then will aggregate it. Now the difference between joins and relationships—as joins do merge the data from different tables in the same source—it merges all the data together, as you'll see in this module. And then we have blends, that's also an approach to combine data from multiple varieties of sources and display them on a single screen. Blending aggregates the data and then displays the combined data in the same view; however, it doesn't merge the data like a join does.
Now these terms were mentioned in module one, but you'll—these are common terms in Tableau—so Dimension and Measure. So we talked about this in the first module, right? Basically, text fields are dimensions in Tableau for the most part, and measures are numeric fields in Tableau, but here's a deeper dive definition. So a dimension is a field that can be considered an independent variable. By default, Tableau treats any field containing qualitative categorical information as a dimension; for example, region or state. Measure is a field that is a dependent variable; that is, its value is a function of one or more dimensions. Tableau treats any field containing numeric quantitative information as a measure; an example there is Sales.
So now we're ready to switch back over to Tableau and get started. We are going to connect to the sample Superstore saved data source that comes with Tableau desktop, and I'm going to just click on it on the left side, and I'm going to go to the data source tab initially. So on the data source tab, you'll see it's on The Logical layer, right, and you'll see relationships; they're also known as noodles in Tableau—the lines in other applications; they're called they're called relationship lines or something—but they're known as noodles here, and you'll see the relationships between the three tables in this data source; they've already been created; they came in automatically with the data source. If you hover over the relationship noodle between Orders and People tables, you'll see the type of relationship; it's known as cardinality; it's a many-to-many relationship, which is the default type—so many orders have many people—and then it's it has a a common field, a related field, which is the Region field appears in both tables. If you hover over the Orders and Returns relationship noodle, you'll see that that that common field is Order ID, and it's the defaults, which is it always defaults to many-to-many relationship. You'll learn more detail about relationships later in the course. So the relationships are already there. Now what we're going to do in the upper right-hand corner is the connection; like I said, it defaults to Live; we're going to actually select Extract, and it's saying the extract will include all data, so we're going to actually add a filter. If we go to the Edit link right next to the Extract, you see that Edit link there, it'll open up the Extract Data dialogue box, and from in here you can specify how much data to extract by applying a filter. So under the Filter section, we're going to click on the Add button, and the field we want to filter on is the Order Date field, so I'm going to select that in the list and click Okay. Now it's asking how do you want to filter on the Order Date field, and we're going to filter by a range of dates, so I select that and I click Next, and then I get to put in the date range that I want. Now I could use the slider here, but I prefer to just go ahead. So the starting date in our data source is January 3rd, 2019, and we only want to see through December 31st, 2019, so I'm going to change that second date to December 31st, 2019. I can actually change it a couple of different ways; I can use the calendar, which I find to be not as efficient as just typing in the date. So basically, we just want to see data for 2019, and then we're going to click Okay at the bottom of that; it shows here in the Filter section on the Extract Data dialogue box, and if you needed to edit it or something, you could click on it, and then your Edit and Remove buttons will become available. We're going to click Okay at the bottom. So now if we look down at our data grid, it updated, and we filtered the extracted data for the year of 2019. And I should mention here that this filter in the upper right-hand corner will filter the data source versus using the Edit link to get to your extract filter, and it works the same way. If I if I click Add there under Filters, I can say something like—um, let's just do this—let's add a filter, and then we'll click Add at the bottom, and we'll use the State Province field for this filter, so I'm going to select it and click Okay, and then I'm going to just say that I want to see California, we'll do Florida and Georgia. So down at the bottom it gives you a summary that you selected three, 59 values; we're going to keep—click Okay—let you know that you're keeping California, Florida, and Georgia; you're going to Okay again, and now your data grid will update to just show those States. So that's filtering the data source as opposed to filtering the extract, and now when you look up at Filters, it lets you know that you have one filter applied. We're going to go ahead and click on Edit there; we're going to click on on our filter State Province, and we're going to remove it and click Okay, and it refreshed your data source, so it's no longer filtered.
So since we're working with extracted data, let's go ahead and go to the Sheet 1 tab, and it forces you to save your extract at this point. So once you decide you want to use an extract as your connection type, when you navigate from the data source view to a sheet view, it will bring up the Save Extract As dialogue box, and it's saving it in your Tableau repository in the Data Sources folder. The other thing is it gives it the .hyper extension, so it's going to name it the name of the data source .hyper extension. I'm going to just call this Sample Superstore Extract and go ahead and click Save. So what happens because we're using extracted data, I'm going to go back to the data source view for a moment. Now once we save the extract, it tells you that it includes a subset of data when and the date and time that the extract was saved, and now your Refresh link is active. So if the original source data gets updated, you would have to come back to data source view to refresh to get the updated data in your extracted data source. Going to go back to the first sheet; on this one, I'm going to double-click under the Orders table; I'm going to double-click on Order Date, and notice it automatically places it in the Columns field. You can drag and drop; you can double-click; sometimes you double-click and it won't place it in in the right shelf for you, so you can drag it and put it where you want it to be if that's the case, but what we want this Order Date to show is the month, so we're going to do the drop-down arrow next to it, and we're going to use the Month for the Order Date, and we decide we'd rather have it in Rows, so I'm going to just click and hold it from Column shelf and drag it down to the Rows shelf, and then I'm going to drag Order Date—we got—going to use it in a different way; I'm going to drag Order Date to the right of Month Order Date in the Rows shelf, and I'm going to change that to Quarter. So we have the month of the order date and the quarter of the order date, and let's go ahead and drag Sales to Columns, and now over on the right toward the top, we're going to expand Show Me, so we see are visualizations that are available. So I'm going to click on Show Me, and it expands that pane, and you'll notice that some of the visualizations are dimmed out; that's because they can't be drawn using the data that you have in this view, so it only gives you allowable visualizations when you do it that way, and it's based on the fields that you are using in the view. So what we want to do is we want to select the horizontal bars visualization; if you hover over them and then look underneath all of the vizes, it gives you suggestions. Now this one is available based on the fields we're using, but it lets you know it says for horizontal bars try zero or more Dimensions, one or more measures, and so we're going to go ahead and just click on it, and now instead of having those little scatter plot icons on our visualization, we actually have the horizontal bars. And then we decide we don't really like the color of these bars, so in the Marks card on the left, we're going to click on Color, and you can select the color of your choice; I'm feeling very Orange today, so I'm making mine orange, and then I can click away from Color. The next thing we want to display are the labels, so each of these bars—everything that's on the chart like the bars on this chart—are known as marks, so each of these marks we like to see its value; it's called a mark label. So in your Marks card, click on Label, and at the top, check the box that says Show Mark Labels, and you'll see that it put the value of each horizontal bar on the right side of the bar, and we can click away from that. We are going to go down and double-click Sheet 1, and we're going to name it 2019 Sales by Month and Quarter and press Enter. Now when we do that, you'll notice that the the chart title also updated. Now we could have the title different from the sheet; if you name the sheet, it's automatically going to assign that name to the title unless you've already named the title something different, and I'll just show you why we want to keep the same title as the sheet name.
But if you right-click on the title and you go to edit title, notice that it has a placeholder for the sheet name in there, and that's why it happens. And you'll see how to fix how to change this later on in the course. I'm going to just cancel out of there, and let's go ahead. I'm going to use the save icon and save this file. And going to name it sample Superstore and just save.
So we're going to start a new Tableau workbook using the same sample Superstore data source. And the reason why we're going to do this is so you'll have all of your files from training. So we save this as sample Superstore, and this is the one that's only using extracted data. But we want to be able to access all the data going forward when we're using this. So what we're going to do is go to the file tab and choose close. And then we're going to use on on the connect tab to the left; we're going to click on Sample Superstore again to use this as a data source. And we're going to go to the data source tab at the bottom. So we're going to leave this one on live so we have all of the data. And what we're going to do is we're going to start working with our metadata, and we can do these things from either the data grid or the metadata grid.
So let's start in the data grid. We have a customer name field in the orders table, and we'd like to split it so we have customer first and customer last. And so in order to do that, we can right-click on the customer name column in the data grid, and we can choose split. And then if you scroll all the way over to the right, you'll see that it actually split it. So the split looks for a delimiter; in this case, it's a space, and it automatically splits it right. So it creates customer name split one and customer name split two, and the or original customer name column, if I scroll backwards, is still there intact. So I'm going to scroll to the right, and I'm going to rename customer name split one. I can right-click on it and rename, and I'm going to just call it customer first and press enter. And name the second split split two, name it customer last.
Now that we've done the split, we're going to hide the customer name field. And you can right-click on it and then just choose hide. And by the way, to unhide fields, if you hide a field by accident, you can actually go over to the gear in the upper right-hand corner of the data grid, and you can show the hidden fields again. So that's kind of how that works. And once you show them, you can unhide them. So they'll show as being dimmed out, but then you can hide them by right-clicking. So we split the customer name into customer first and customer last, and we hid the original customer name field. And before we do anything else, let's go ahead and save this Tableau workbook. And we'll save this one as sample Superstore Das live so we know we have the live connection here including all of the data.
Now we want to rename a field just to make it a little bit clearer. So we have a field in our data called segment, and we want to rename it Market segment. We can do it either from the data grid or metadata; this time I'll use metadata. And I'm going to do the drop-down next to segment and choose rename, and I'm going to just name it Market segment. So that's how it will show when we use it in our views. We we'll be able to use the split customer field in our views as well. So we've gone ahead and renamed a field here in the metadata pane. And the other thing I want to show you is this: you can right-click on postal code codes in the grid and choose aliases. So the name of the field is postal code, but the aliases are all of the postal codes in the data set. So it recognizes them individually as postal codes. We're going to just cancel out of there. Let's go to sheet one.
Now we're going to recreate the chart that we did in the Su sample Superstore extract that we utilized earlier. We're going to recreate it here, but we have all of the data. If you notice in your left pane here, you don't see the customer name field because we hid it, and you're seeing customer first and last, which are our splits. And you also see that segment has been renamed Market segment here. So what we're going to do is we're going to drag the order date from the orders table to the columns field and do the drop-down and make it show the month. And then we're going to drag order date to the columns shelf again. And actually, no, both of these need to be in rows. So I'm going to drag month of order date down to rows, and the year of order date down to rows to the right of month. And I'm going to change the year of order date to quarter. So this is the same thing that we did before. And now what we need to do is we need to just drag sales to columns. And then if your show me panel is not expanded, you can expand it by clicking show me, and we're going to do our horizontal bar chart again.
Now, just as a challenge, we wanted to show the mark labels, and we wanted to change the color; in my case, I changed it to orange. So I'm going to have you try to remember how to do that on your own. So I'll give you some hints. I'll say it again: we are going to add the labels to the bar marks in this chart, and we want to change the color of the chart. Go ahead and do those two things. And we have the exact same chart that we had in our extract when we were using the extracted data. We're also going to rename this sheet tab. So we're going to just say, um, sales by month and quarter, and and press enter. And that will give us the same name as a chart title. So that's kind of how that works. In here, we're using all of the data; just wanted to recreate that chart.
Now we want to share our data source connection. So we are going to go to the file tab and select share. It may prompt you for your credentials for Tableau online; um, if it does, you need to put in your credentials, but it will ultimately bring you to this publish workbook to Tableau online dialogue. And so the project here, I have a project folder set up on Tableau online called training Tableau training; um, if necessary, you can save it to your default project, which comes which comes with Tableau online. Now, down here, I'll just point out a couple of things. If you look at sheets, there's an edit link. If we had multiple sheets in this workbook, we could just decide to share some of them or publish some of them, and that's where you would edit which sheets you want to publish. Where it says data sources, it lets you know that this data source is embedded in the workbook; it's not separate from the workbook; it's part of the workbook. This is a Tableau sample file that we're using, so we can edit next to that, and if we want it to, we could tell it to publish it separately. Now, in this case, we're going to leave it embedded in the workbook. Or you could publish your data source separate from the workbook. We're going to leave it as embedded in workbook. If I go to edit next to data sources and I change it here, first of all, notice that the green button at the bottom says publish, but if I change it to publish separately, that green button will change to publish workbook and one data source. I'm going to put it back on embedded, so just like to point that out. And now I'm going to go ahead and click publish, and it's going to give me the progress of its publishing. And when it's done giving me the progress, it will automatically switch me to Tableau online. When it's done, it gives me the publishing complete dialogue, and I can preview different device layouts, or I could share a workbook from that dialogue. I'm going to close that dialogue. And so so we're in the views, which is like the sheet right, so we're in the view. There's a data sources tab, and you'll see that it says extract, and it gives you a date; in my case, back in September, um, this is because it's embedded, and that's when that sample file was created. So when the data source is embedded, it shows up as extract. If you had separated it, it would show up as live. We're going to go back to the Views tab here, here, and we're going to click on the more actions ellipses underneath our little visualization there, and we're going to choose share. So now I can share this, and because the data source is embedded, it's going with it as well. I'm going to share this with just another user in my organization, and I'll go ahead and click share. And that user has permission, so it's letting me know that it was shared, and and I can switch back over to Tableau desktop.
Now, before we start creating joins in our sample Superstore live data set, we are going to talk about the basic four types of joins that are available in Tableau. So the first join type is a left join. It merges the contents between the two tables; the resulting table, the merged table, would contain all of the records from the left table and only the matching records from the right table. If there are no matches in the right table, no values will be shown in the data grid. The next one is a right join, which is kind of the opposite of a left join. It also merges the contents between two tables; all joins do. The resulting table contains all the records from the right table and only the matching values in the left table. If there are no matches in the left table, no values will be shown in the data grid. Then we have an inner join; only the common matching data between two t tables is displayed in the merge table. So think of this one; I'll give you an example of this one. Let's say table A is a customer's table, and table B is an order table; the merge table would only show customers who have orders with an inner join. And last last but not least, we have a full outer join. So the data from both tables are merged and displayed; the values that are not matching in both tables are shown as null values.
Now we're going to go over and start creating joins between the tables in Sample Superstore. Let's go to data source view in our sample Superstore workbook in Tableau. And so we talked about this a little bit earlier; this is the logical layer. The upper half of the data source view canvas is the logical layer, and that's where relationships are either brought in with the data source or created. So you don't create joins in the logical layer; you create them in the physical layer. And to get there, you're going to double-click the orders table in the canvas. And so now you're in the physical layer. And by the way, to get out of the physical layer, you would do the X in its upper right-hand corner to go back to the logical layer. So it lets you know that orders is made of one table, right? And so it when you have a physical table, orders is like the main table, right? When you have a physical table, it automatically, excuse me, a logical table, it automatically creates an instance of the physical table for you. So orders is already there. Now we want to join the other two tables. So we have a people table and a returns table. What we're going to do is we're going to drag the people table into the canvas to the right of orders. Um, I just want to show you something; if I hover underneath orders, it says drag table ble to Union, and we're not ready for unions yet; we're going to just do joins. So I'm dragging away from there in any blank space where that little message is not popping up, and then I'll drop it, and it's able to detect the common fields between the two tables. And if you hover over the join symbol, it lets you know that it's inner join of orders and people. So it's only showing people that have orders, and the common field is the region field between those two tables. Now, if you look down at your data grid, it's combined because when you're joining tables, you're merging the data. So if you start scrolling to the right, you see all of the fields from the orders table, right? And if you continue to scroll to the right, you'll start seeing the fields from the people table as well. Well, so it's actually combining the data from the two tables into the merge. We're going to join another table here. So grab your returns table and drag it into the grid, and you'll see that orders is related to both the people's table and the returns table. And again, it gave this one an inner join, so it's only showing returns; it's only showing orders that have returns, right, right. And so the common field between those two tables is the order ID field. Now, if you're ever in a situation, and we're not in that situation, where you need to change the join type, you can just click on the join, and this is where you can modify the join type if necessary, right? Inner join is the most common join type because you normally want to see the matching records between the two tables. We're going to go ahead and close the join dialogue, and notice it says here orders is made up of three tables, right, three physical tables define the logical table orders since we did the joins. And now the other thing that we can do here is we can go ahead and close this physical layer by using the X in the upper right-hand corner of it. We're back in our logical layer, and now you'll see the join symbol on the orders table letting you know that there are join tables. And if you hover over it, it gives you the information. And if you look in your data grid or even in your metadata grid, if you scroll down, you'll see that you have the data from all three tables there: orders, people, and returns. It merges the data when you do a join. Go ahead and save.
For our blends lesson, we're going to use a different two different data sources. So we're going to go ahead and go to file and close this sample Superstore live workbook. We'll be using it again shortly. And then we're going to go to home so we get back to the start page. So there are two CSV files, Excel CSV files, that we're going to be accessing for this exercise on blending. And so one of them is known as orders, and the other is order payments, and they're in the files from the video description as I mentioned in this module overview. So an Excel CSV file is the same as a text file according to Tableau here. So on the left under connect, we're going to select text file, and you may need to navigate to wherever you stored the files from the video description. So we see these two CSV files. I'm going to select the orders file first, and I'm going to just double-click it. And so it takes me to data source view. Now, in order to do a blend, you have to have two separate data sources. And the way to add the next data source is by going to the orders drop-down right here at the top of the screen where it says orders. We're going to go to the drop-down next to that little database icon, and we're going to choose new data source. And so we're going to select text file again, and we're going to grab order payments. So to switch between the two, we can go back to that database drop-down, switch back to orders, and you can take a look at some of the fields that are in that table and the contents in the grid. And then you can go to the drop-down and swi switch to order payments, and you can see what data is included in there. Now they both have an order ID field; again, it's common fields; that's the theme. We're going to go to sheet one, and notice at the top of your data pane you have two different data sources. Let's switch to the orders data source, and we are looking at the table, the orders table here, and its fields. And what we want to do is we want to drag the order ID field to the rows shelf; it has all of the order IDs listed in rows. Now, if you look at that orders data source, it now has a blue check mark on it, and I'll just kind of point to that so you can see it a little bit better on my screen anyway, but the orders table has a blue check mark on it, and that means that it's the primary table in the blend; that's what that's representing. Okay, so now we're going to switch to the order payments data source, and we're going to drag; we're not going to use the columns or row shelves for this one; we're going to drag payment value directly into the ABC column on the sheet. So now it updates, and what it does, if we had dragged payment value to the text box on the marks card, we would have gotten the same result. So it's showing the sum of the payments for each order ID. Now, if you look up at the top of your data screen here, the order payments table has an orange check mark, which means it's a secondary source. So the the primary data source for the blend will be chosen as soon as you put a field in the view. So the first field that we put in the view was from the orders table, and that's why it made it the primary source in this blend. As soon as we dragged a field from order payments into the view, it actually created the blend. So remember, blending is not merging, right? It's not combining the data sources; it's just blending it, and it's done at the sheet level. Blends are done at the sheet level, so it's just blended on the sheet. Now let's go ahead and save this, and we're going to just call this one Blends and save it.
So something else I'll point out here is we're on the order payments data source, the secondary data source, and notice there's a red chain to the right of the order ID field. And if you hover over that, it will say stop using order ID as a linking field. If you wanted to break the link, you wouldn't have a blend. It was able to detect automatically that it had a matching field and therefore was able to do the blend. If you go to the orders data source, you're not seeing that; it shows just in the secondary one, which is orders order payments; it's showing the linking field. Now, if you did need to edit your link, so to speak, you could always go up to the data menu and choose edit blend relationships. If it doesn't automatically detect it, you might have to come in here. If the fields are different names or something, you might have to come in here so that you can tell it what the linking fields are. In our case, it's showing the primary data source, and it's showing the matching fields between the two data sources, right? If we go to custom, we can open that up. So that's what you would do if it wasn't here; you would have to go to custom and tell them which fields are the matching fields. I'm put it back on automatic, and I'm just going to cancel out of there. And now we're going to just go ahead and close this file, say yes if it prompts you to save any changes, and we're going to reopen our sample Superstore live workbook.
So the last topic in this module is filtering. We're going to start in data source view, so let's go there. We're going to do different variations of filtering here. So I mentioned earlier that you can filter your data source by using filters in the upper right-hand corner, and that's just what we're going to do. So we're going to click the add link underneath filters, and we're going to choose add, and we're going to select the state province field. And then we're going to select the the states that we want to keep in our data source that we want visible. So we're going to select Arizona, California, scroll down until you see New Mexico and select that, and then we're going to select Washington State as well. So down at the bottom, you can see that you have four of 36 values selected. We're going to click okay and then okay again. So our data source has been filtered.
Let's go to our "Sales by Month and Quarter" sheet tab. When we click on that sheet, it adjusted our chart because it's only showing the information for those four states. Just to verify that, in your data pane over on the left, you can expand "Location" if necessary and just drag "State and Province." So I dragged "State and Province" to the Rows shelf, and you can see that it's only pulling from the states in our filter. Now, to get rid of "State and Province" because we don't really want it, you could either use the drop-down arrow or right-click on it and choose "Remove" at the bottom, or you can just select it by clicking on it once and press Delete on your keyboard.
Now we're going to create a new sheet. Now we're ready to create a new visualization, and we're going to be doing that by creating a new worksheet. So there's several ways that you can add more sheets to your workbook. The first way is, if you look at your "Sales by Month and Quarter" sheet tab, to the right of it you have three different icons, each with a plus sign on it. The first one would give you a new worksheet, and I'll point these out. The second one would give you a new dashboard view, and the third one would give you a new story view. Now there's multiple ways of doing this. If I want a new sheet, what we're ultimately going to do is we're going to just click on that new worksheet tab, the first one. But if you right-click on that tab, you can see that you can create a new dashboard view and a new story view from the right-click menu. Another way to do this is if you go up to the Worksheet menu and you use the drop-down, you can grab a new worksheet from there. If you go to the Dashboard menu: "New Dashboard," "Story," "New Story." So whichever way you want to do it, go ahead and create a new worksheet.
We're going to drag the "Customer Last Name" to the Rows shelf, and we're also—and you can double-click over here as well—I'm going to double-click on "State/Province." You might have to expand the "Location" field; it's in a hierarchy from broadest to narrowest. So we're going to double-click "State/Province," and if I double-click it, it's going to give me the hierarchy and then the highest level of the hierarchy and then "State/Province." So I'm going to show you how to get rid of those. I'm going to just get rid of that "Country/Region" by using the drop-down and selecting "Remove," and I'm left with "State and Province." And you can see in this table, kind of grid, that it's just showing our filtered data. The other field we're going to use, at the very bottom of the "Orders" table, we're going to choose the "Orders Count" field; that's a measure. We're going to drag that to "Columns," and so we're seeing a count of orders by customer last name, broken down into their states. And so it's just really showing West and Southwestern states. We're going to name this sheet—I'm going to just do "W" for West and "S SW" for Southwest—and then we'll say "Order Count," so "West and Southwest Order Count," and press Enter. And it names the sheet; it names the title that as well, which we're fine with in this instance.
Let's say that we only want this particular visualization in this file to be filtered for those four states. I'm going to show you how we can handle that. Let's go back to our data source view, and we're going to remove the data source filter. So we're going to use the "Edit" link underneath "Filters," select our "State/Province" filter, and remove it, and then "OK." So now, if we go back to "Sales by Month and Quarter," you'll see that it's adjusted for all of the data. And if we go to our "West and Southwest Order Count," you can see that it has all of the states in it as well. And this is the visualization that we want to filter for those four states. So the way we can do that at the visualization or sheet level is we can go to the "State/Province" drop-down in the Rows shelf, and the top choice is "Filter." Underneath all of the states, you're going to select "None," because in this filter it comes in with everything selected. And then we're going to select Arizona and California, and we're going to scroll down, and we're going to grab New Mexico, and I forgot Oregon, so we'll go ahead and grab that one—that's in the West—and then we'll go down and grab Washington. So we have five selected instead of the four we had selected previously, and we are going to go ahead and click "OK."
If we go back to "Sales by Month and Quarter" and we drag the "State/Province" field—I'm going to drag it to the Rows shelf—you can see that we have all of the states. And then I'm going to remove it from the Rows shelf. But on the "West and Southwest," we only have the five selected states in there because we did a visual level filter instead of a data source filter. Let's remove the "Customer Last Name" from the Rows shelf. If we want users to be able to filter for the states that they want, we can set up a different kind of filter here at the sheet level. So let's go back to our "State/Province" drop-down in the Rows shelf, and we're going to edit the filter here. Underneath the names of the states, we're going to select "All," and we're going to click "OK." And then what we're going to do is we're going to go back to the "State/Province" drop-down in the Rows shelf, and we're going to choose "Show Filter." So on the right side of the screen, you get a filter panel, and then any users of this workbook can filter for whatever states that they want. So I'm going to deselect "All," and I'm going to select California and then New York, and I'll go back up and grab Florida. So this time I just want to see the count of orders for those three states. And then I'm going to change it back to "All" because we changed the type of filter. Now the sheet tab name doesn't make sense, so we're going to double-click on the sheet tab and we're going to just name it "Order Counts by State," and go ahead and save.
By way of recap, in Module 2, we started with a very brief overview of the Tableau paradigm, and you were introduced to some helpful definitions. We connected to Tableau's sample Superstore data source and reviewed the relationships, noodles, and used a data extract based on a range of dates. We learned how to filter the data source and how to save the extract. We then moved on to creating a horizontal bar chart and making minor formatting changes, such as changing the color of the bars and showing the mark labels. We then saved and closed that workbook and created another using the same Tableau sample Superstore data. And in that one, we decided to use a live connection. We split the "Customer Name" field and renamed the splits "Customer First" and "Customer Last." We also renamed another field in the data source for clarity; um, that was the "Segment" field that we renamed "Market Segment." We hid the original "Customer Name" field that we split, and we viewed the aliases of the "Postal Code" field. We recreated the bar chart and learned how to share data source connections. We reviewed the different types of joins and then created joins between the tables to merge the data by accessing the physical layer, also known as the joins, SQL unions canvas. We moved on to creating blends and learned how to add both data sources and how to blend them. We also learned how to edit the blend if necessary, if it wasn't able to detect the common fields. We then created another data source filter in our live connection sample Superstore file and saw that it impacts all the data in the workbook. We removed that filter and learned how to filter at the visualization level. We also learned how to give users flexibility with filters by showing the filter pane on the visualization sheet. Thank you for viewing this Tableau introductory course. We're going to review, by way of conclusion, what we've covered in this extensive course. In the first module, you got your feet wet. We connected to an Access database, and we explored the home screen in Tableau. After we connected to the database, we explored the data source view, and you learned that that view initially displays the logical layer of the canvas and that you can double-click on a table reference there to get to the physical layer of the canvas. We then moved on to sheet view and got an overview of that view in Tableau, and then we created a map visualization and a line chart. We went into creating a dashboard where we used both of those visualizations, and we gave it some interactivity. In Module 2, you briefly learned about the Tableau paradigm, why it does what it does as you drag and drop, and then we connected it to a Tableau sample Superstore data source. You learned how to work with extracts instead of live connections. You learned about metadata and sharing your data source connections. We moved into joins and blends using two CSV files and also learned how to filter data.
Welcome everyone. I'm Trish Conor, and this is Tableau Introduction. Tableau is a visual analytics platform that makes it easier for people to explore and manage data and faster to discover and share insights that can change businesses. It helps people and organizations be more data-driven. Tableau supports data prep, analysis, governance, collaboration, and more. This Tableau basic training course is designed as an introduction to Tableau for beginners. On completing the course, students, students will have a firm grasp of the basic techniques required to create visualizations and combine them in interactive dashboards. Specifically, students will meet the following learning outcomes, among others: moving from foundational to advanced visualizations using row-level and aggregate calculations. Thank you for viewing this Tableau introductory course. The third module in this introductory Tableau course is where we'll move from foundational to advanced visualizations. The first lesson you'll learn how to compare values across different dimensions. The second lesson, we'll get into visualizing dates and times, and then we move on to relating parts of the data to the whole. We'll continue with visualizing distributions and end with visualizing multiple axes to compare different measures. There are a few definitions in here for you, so qualitative data is descriptive, and quantitative data is numbers-based, countable, or measurable. When we're comparing values across different dimensions, those terms will be important for you to know, at least in the background. Multiple axes are useful for analyzing measures with different scales. So, for example, if your sales numbers are much higher than your profit numbers and you put them both in the same visualization, your profit marks may not show up as well. So that's an example of when you would want to use multiple axes, so you'll have a scale for each set, each data field that needs one. And then two other terms: continuous and discrete. In terms of an axis, continuous is formed as an unbroken whole without interruption. Generally, continuous fields add an axis to the view, and discrete fields, in terms of an axis, they're individually separate and distinct. Generally speaking, discrete fields add headers to the view, and you'll see all of this in action as we get started. We'll be using our sample Superstore live workbook. Look for this module.
Okay, so back in Sample Superstore, and I'm still on the "Order Counts by State" worksheet, um, just going to go over a couple of those definitions that I gave you in the slideshow. So on this one, if you use the drop-down next to "State and Province" in the Rows shelf, you'll see that this is a dimension, but we can change a dimension into a measure anytime we want to. So we're going to hover over "Measure," and we're going to just select "Count." So now we're getting a count of states, and it looks weird on this chart; it makes no sense on this kind of chart. So we're going to go back to the drop-down for "State/Province," and we are going to click on "Dimension" to turn it back into a dimension like it originally was. Now let's look at the "Orders" measure that's in the Columns shelf. If we use the drop-down on that, you'll see that it is continuous, meaning that you have an unbroken line in the axis; it's just continuous on the bottom of the chart. Let's see what happens if we change that to discrete. So now we have each count of orders is individually separated and distinct. So we're going to go back to the drop-down for "Orders," and we're going to make it continuous again, so you see the difference between continuous and discrete. Now this "State/Province" is a dimension, and the "Orders" is a measure. In other words, using some of our definitions, the "State/Province" field is qualitative; it is descriptive, and the count of "Orders" field is quantitative, which is numbers-based and countable, plus it's measurable.
Now we're going to create a new worksheet in this workbook, and we'll be able to learn how to compare values across different dimensions. So I'm going to go ahead and create a new sheet, and we are going to create a cross-tab type of visualization. And what that means is that you're using a dimension on both the x-axis and the y-axis. It automatically generates a cross-tab. So what we're going to do is we are going to drag our "Market Segment" field to the Columns shelf, and we're going to drag our "State" dimension—where is my state—oh, it's under "Location"—there it is, "State/Province"—and I'm going to drag that to Rows. Oh my goodness, I repeated a bunch of stuff here. So once again, my mouse is a little sticky, and I apologize for that. I'm going to just remove these extra fields. And so this is the beginnings of a cross-tab where I have a dimension on the top axis and a dimension on the left axis, so X and Y here. And now we're going to add another field; we're going to use a measure, and we're going to drag "Sales"—we're not going to drag it up to one of the—to either the Columns or Rows shelf—we're going to drag "Sales" right here into this section of the cross-tab. We'll get the same effect if we drag it to "Text" on the Marks card, so whichever way you want to do it. And now we're seeing we're able to compare the value of sales across different dimensions, "Market Segment" and "State." And so one of the things we can do with this, of course, is a little formatting. I'd like the sum of sales numbers to be in currency format. So what I'm going to do is I'm going to use the drop-down on "Sum of Sales" in the Marks card and choose "Format," and on the format pane for numbers, I'm going to use the drop-down and select "Currency (Standard)."
Now we're ready to start talking about visualizing dates and times. So let's start first on the Data Source tab. And so we're still using the Sample Superstore data source, and I can tell you that dates are not stored in the date/time data type in that data source; there are no times in the data source. But let's play make-believe for a moment. Typically, when you connect to the data source, it will bring in the—the appropriate data types for each of the fields. Sometimes, however, if your data in your—your data source, if your dates in your data source are formatted as date and time, it may not detect that. It normally does, but sometimes it doesn't. So if that's the case and you need to work with the time part of the date, you can change the data type yourself right here in the metadata grid on the data source view. So what I'm going to do is I'm going to look at "Order Date," and you notice the type has a little calendar there, and that's the date data type. I'm going to select right there—excuse me—that's the date data type on the calendar. I'm going to click on that calendar, and I'm going to change it to "Date & Time." Now, if you expand your "Order Date" column in your grid, because there are no times in the original data source, it's going to set all the times to 12 a.m. So typically it will detect the date/time data type, and you'll notice the symbol; it has the calendar with the clock on it. It will normally detect that. If you know for certain there are times in your date/time in your data source and you need to use those times in your visualizations, you can change it like we just did here. Now we're going to just change that data type back to "Date." And now let's create a new worksheet.
So when you're using a date field in a visualization, it applies an automatic date format to it. Let's see this in action. Let's drag the "Order Date" field to Rows, and then we're going to use the drop-down on it, and we are going to select "Day." And I selected the second day. So you'll notice that it puts in a three-character month, and then it puts the day, a comma, and a two-character year. That's the automatic format that it's using. Well, maybe we want our dates formatted differently. And so this is how you can do that. In your data pane on the left, you're going to right-click on the "Order Date," and you're going to choose "Default Properties," and then "Date Format." So notice it defaults to "Automatic." You have a standard long date format in here, a standard short date format, and then a whole host of other different date formats. We want to use the date format that says "14," so—so we want the day before the month, so "14 March 2001" is the one we're going to use. So we're going to select that, but we don't want the comma after March. So with that date format selected, we're going to continue to scroll down to the bottom, and we're going to select "Custom." And so when you have a format in this list selected and then you go to "Custom," it gives you the format for that item you had selected. So all we have to do is remove the comma before the year and click "OK," and notice our dates adjusted. Now the thing about doing this on this sheet, we've changed the date format for that field regardless of what sheet you're going to use it on in a visualization, so keep that in mind as you're doing this. And so let's drag that "Day of Order Date" to Columns, and then we'll just go back and we'll add "Profit" into Rows. Anytime you're using dates in a visualization, you're doing time series analysis. So this is showing the profit over time. And let's go ahead and name that sheet "Profit Over Time."
Before we move on to our next lesson, I want to revisit continuous and discrete fields. And so let's create a new worksheet. And in the new worksheet, we're going to drag "Sales" to Rows and "Quantity" to Columns. So now we have two measures, one in Rows, one in Columns. Okay, and it gives us a scatter plot visualization, which makes no sense, which we're going to fix here. So one thing I want to point out here is when you look in your Fields list, the green fields, the green ones are continuous, and blue are discrete. So what we're going to do is we're going to change that. Let's go to the "Sum of Quantity" drop-down, and we want to just make this a field; we don't want to make it a measure. So let's go ahead and choose "Dimension." So it's not doing the aggregate of sum on it; it's just showing all of the quantities on this line chart, and you can hover again on any point to see the quantity and the sale and the sum of sales on the tooltip. So let's go back to the "Quantity" drop-down, and you'll notice that not only is it now a dimension, but it's continuous. Let's change it to discrete, and now we have each individual quantity has its own broken, individual, separate part on the axis. And we're going to use the drop-down on "Quantity," and it also changed it to a column chart when we did that. If we change it back to continuous, we'll get our line chart again. So I think this highlights it a little bit better than it did before. So we're going to actually just name this sheet "Discrete vs. Continuous," just so you have a reference for why we created that sheet.
So our next lesson is where we're going to be relating parts of the data to the whole, and the question we're asking here is what percentage of total national sales is made in each region. So we're going to do a new sheet—another new sheet—and on this one we're going to drag "Sales" to the Columns shelf, and we're going to drag "Region" from the "Orders" table to Rows. So we have the sum of sales by region here. What
We want is the percentage of total national sales for each region. In order to do that, we're going to use our analysis menu. So I'm going to go up to analysis on the menu bar, and I'm going to hover over percentage of, and we're going to choose column, oops, because our sales are in the column. So now it's showing—if you look at that horizontal axis—the percent of total sales for each region. And if you hover over any of the regions, you'll see on the tool tip what region it is and its percent of total sales. So that was easy breezy, and now we're going to name the sheet and we have our answer: Percentage of total sales by region. Let's go ahead and save our file.
Now you're going to learn how to do some analytics by showing by visualizing distributions. And so let's go back to our sales by month and quarter sheet. And what we're going to do is we're going to add distribution bands to this visualization. Now you have total control of the values of the bands that you're going to see and how the bands are going to be placed on your visualization. So in order to do this, on your data pane to the left, at the top of it, you have that analytics tab, and we're going to go there. Now they have the analytics options grouped, so you have summarizing analytics, you have model, and you have custom. It's under custom that you'll find distribution band. Now you'll notice that a few of the analytics are dimmed out, not available, so they won't be available if your data doesn't support that type of analytic. And so what we're going to do is we're going to click on, click and drag distribution band onto your visualization, and you'll get the add a distribution band popup. And we're going to just drop it on table, so you get the edit reference line, band, or box dialogue that pops up. And I'm going to just move mine out of the way, and you'll see what it's done is it placed a 60% and 80% of average distribution band on our table. Now we're going to change that, but before we do so, we drag distribution band into the table placeholder. And so our scope here is entire table. Click on the option button in front of per Pane, and you'll see, so the pane is each quarter is in a pane, and then if you do per Cel, it's just each mark on this bar chart has the Distribution on it. We're going to take it back to to entire table. In the computation section where it says value, we're going to do the drop-down. Now on the left side, we're going to leave it on percentages, but we're going to change the percentages that are there. So we are going to select the 60 and 80—notice they're separated by commas but no spaces—and we're going to type 15, we'll do 25, and we'll do 45, or actually make it 35; 15, 25, and 35. And notice underneath that it's a percent of sum of sum of sales, but it's showing the average in the distribution band. If we wanted to see the sum, we could change it to sum. We're going to leave it on average. And so just looking at it, our bands are too close together to really be able to see, so we're going to change it. We're going to change our numbers, so we're going to do 15, 35, and 55, and we click out of that, and it adjusts a little, little bit more. Think I still want different numbers here, so it really depends on how it shows. I'm going to go from 15 to 50, well actually I'm going to change all of the numbers. We're going to use 10 as the first number, so we'll do 10, 40, and 60, and click away from that, and I can see the distributions little bit better with that. Let's see what happens if I go and change it from average to sum, and now we're getting some better distributions. If I click away and just move this box out of the way, I can see that 40% of sum is here, so 10% of sum is here; 40 would start there and 60 would start there. So I'm going to just change my values again so you see how it differs whether you have it on sum or average or any of your other choices down there. So I'm going to leave 10 and then I'm going to do 20 and 30, click away, and we can see how that looks. So all of my bands are showing the way they should be. You'll notice down here that I have 10%, 20%, and 30%. I'm going to go ahead and click okay on that box. Now if I wanted to go back in and edit it, I can simply right-click on one of the percent of sum and choose edit, and it takes me back into that dialogue. Go ahead and click okay. So what would be the value of 10% of the sum? If I hover over the right border of that 10% band, well, the left border of that 10% band, and a tool tip will pop up that tells me 10% of the sum equals, and in my case it's 7849. I can edit from here, I can format from here, or I can remove. If I hover over the next darker, uh, bold horizontal line to the right, it's showing me 20% of the sum, and then if I hover over 30%, it's showing me 30%, and that's outside of the range of the data that we have here; that's why nothing is in that 30% band.
And our last lesson in this module is visualizing multiple axes to compare different measures. So let's go ahead and create a new sheet. And so this is when you want to analyze two measures that have different scales. So what we're going to do is we're going to add order date to columns, and we're going to change it to the quarter of the order date, and I just did the first quarter on the list, and we're going to drag both sales and profit to rows. So Tableau automatically split the visualization with sales on the top and profit on the bottom, but look at the difference in the scales: Sales goes from really, let's see what this first point is, like 106,000, and it peaks at 359,000. Profit starts at 21,000 and it peaks at 46,000. So we have wildly different scales here, and so what we're going to do is we're going to right-click on sum of profit in rows on the rose shelf, and almost at the bottom, we're going to click dual axis. So now it combines them, and it gives the lines two different colors. And you'll notice that you have your sales axis on the left and your profit axis on the right, and that way it makes a little bit more sense, and it even created a little bit of a legend over here on the right with the measure names. Now for that legend, I can do the drop-down, and you can format the legend. It's showing the title. I'm going to uncheck title just so it doesn't need to say measure names there; it's good enough with profit and sales. So that's a good example of when you would want to use dual axes in a visualization if your scales are widely different. And we're going to name this sheet Sales and profit by quarter and go ahead and save your file.
Module 3 started with learning about Dimensions, measures, and discreet versus continuous fields and how they impact the axes on visualizations. We created a cross-tab viz to compare values across different dimensions and worked on changing the data type of a date field and changing the date format for the entire workbook. We answered the question, what percentage of total national sales is made in each region, on a visualization. We moved on to adding distribution bands to a viz by using the analysis tab in worksheet view, and we learned how to view the actual value of the different distribution bands. We ended this module with creating a dual axis to show differing ranges of values. Module 4 is entitled Using row level and aggregate calculations. This module will narrow our focus to calculations and Tableau by exploring these topics. You will learn practical examples of calculations and parameters. So we're going to start with a slide that breaks down the three levels of calculation in Tableau. Then we'll get hands-on by creating and editing calculations. The third lesson we'll focus on creating parameters. Then we'll move on to key performance indicators. In lesson five, you'll learn how to do ad hoc calculations, also known as inline calc calculations, and then we'll end up going over some performance considerations for calculations in Tableau.
Tableau has three levels of calculation that are listed on this slide. We're going to start with basic expressions. These allow you to transform values or members at the data source level of detail, which is known as a row level calculation, or at the visualization level of detail, which is known as an aggregate calculation. Then we have level of detail expressions, known as LOD. Just like basic expressions, LOD expressions allow you to compute values at the data source level and the visualization level; however, LOD expressions give you even more control on the level of granularity you want to compute. They can be performed at a more granular level, a less granular level, or an entirely independent level. And last, but certainly not least, we have table calculations. Now we're not going to be doing any table calculations in this module, but the next module is dedicated to table calculations, but just so you know in the background what they are, they allow you to transform values at the level of detail of the visualization only.
I have a few definitions for you before we get hands-on. During this module, we'll be creating parameters, key performance indicators, and ad hoc calculations. A parameter is a workbook variable, such as a number, date, or string, that can replace a constant value in a calculation, filter, or reference line. These are placeholder variables that you can use in a formula so that the actual value is specified at runtime. They actually can allow you to provide more flexibility to your end users as well. Then we have key performance indicators, KPIs, that is a measurable value that shows how effectively a company is achieving key business objectives. And then ad hoc calculations are calculations that you can create and update as you work with a field on a shelf in the view. Ad hoc calculations are also known as type-in or inline calculations.
We're going to create a row level calculation to get started, and we're going to do it on the ship mode field in the orders table. So let's create a new worksheet to get set up for this. And on, on the worksheet, you're going to drag order date and sales to the column shelf and go ahead and drag ship mode to the rows shelf. So if you look at the ship modes, we have first class, same day, second class, and standard, and we're going to create a row level calculation that's just, just going to display the first word in the name of the ship mode. So we want it to display first, same, second, or standard. And the way we're going to do that is we're going to double-click on ship mode in your row shelf. So when you double-click on it, you can see that it has brackets around the field, right? That's just how Tableau works; all the fields have brackets around them, square brackets. And we're going to click in front of the first square bracket, and we're going to type split, or start typing split. Now it's a function; it's the split function, right, um, and when we split our customer name into first and last in the background, it was using this function. So once I see the function on the list, I just highlight it and I tab it in so that way I can avoid any typos or stuff like that. And then if you look right underneath the rows shelf, it gives you the syntax for the split function. So it requires a string, a delimiter, and a token number. Those are the, those are the parameters of that, or excuse me, the arguments of that function. So when we tabbed and split gave us the open and closing parentheses, and we're going to get rid of the closing parentheses right now. So we want the ship mode to have the open parentheses in front of it, and then you can press your end key on your keyboard, end, to get to the end of that line, so you're outside of the closing square bracket for the ship mode field at this time, and you're going to type a comma. And now notice right underneath it's looking for the delimiter argument that's in bold. Now first string was in bold; we told it the string argument is being met by ship mode field, and now we need to give it the delimiter, mar, um, the delimiter argument. So we're going to type, uh, open double quote, space, close double quote, or another double quote. So that represents a space, so we're saying that in the ship mode field, the space is what separates the first word from the second word, and then we're going to do a comma because all of your arguments are separated by comma, and now it's looking for the token number, of the, the token number argument. So what we want is we want the first block of text before the space to be what displays, so we're going to type a number one there, and then we're going to type the closing parentheses. So it should say split, split, open pin, open square bracket, ship mode, closing square bracket, comma, double quote, space, double quote, comma, 1, closing parentheses. Now when you're outside of the parentheses, notice the popup; it says to apply this, do control and enter. So press control enter, and now you'll notice that it has split the ship mode, so it's only showing the first row. We all, we have first, same, second, and standard, which is what we want. Let's go back up to our row level calculation and change the token number to two. Do your end key to get outside of the parentheses and control enter again. So now it's just showing the second word, right? And that's how that works. Change it back to a one and get outside your pen and do control enter again. So that is an example of a row level calculation. Let's go ahead and name this sheet; we'll name this sheet Row level calculation for your future reference and go ahead and save your file.
Now we're going to create our aggregate basic calculation, and we're going to do this by making a duplicate of the sales and profit by quarter sheet. So I'm going to select that sheet, right-click on it, and choose duplicate. So it gives it the same name, but it has the number two after it. And let's rename this sheet, the duplicated one, to Aggregate calculation. The only field we want to keep is in the column shelf, so the quarter of the order date. So we're going to remove the sum of sales in rows and the sum of profit in rows. Now we're going to double-click in the rows shelf, and we are going to type sales, and it shows up on the list, the sales measure. If you take it off of the list, it puts the square brackets around it. We're going to type a minus sign and then type profit, and you can grab that from the list as well, and you're going to do control enter. So that shows up on the visualization, right? Sales minus profit equals cost, and so that's what's showing on this visualization, the cost by order date at this point. Now the cool thing about that is that we can save that as a field, right? So we're going to grab—I'm going to click away from it first, so you notice when you click away from it, it says sum of sales minus profit—and we're going to click on that, oops, I'm just trying to do a single click, and we're going to drag it into the field list. So now it shows up as a measure, and it just says sales minus profit. What we're going to do in the field list is we're going to rename it, and we're going to call it cost. So it updates in the field list, and it also updates in the calculation that we created. So what we're going to do is we're going to rename this sheet—oh, we already named it Aggregate calculation; that's fine, we don't have to rename it. So you can see that we used a calculation at the visualization level, and we created a field out of it, and you can go ahead and save again.
The first adjustment we're going to make on this line chart is we're going to make the quarter of the order date a continuous field instead of discrete. You can tell at the bottom that it's showing the quarters as individual, separate items. The other indicator is that the color of the C order, order date field in the column shelf is blue, which represents discrete. So let's do that adjustment. I'm going to right-click on it in the column shelf, and I'm going to go down and just choose continuous. And now we have that continuous axis going across the bottom. And now I want to point out some information at the very, very, very bottom of your screen, under, underneath your worksheet tabs, you have a little bit of a status bar on the left, and a status bar is currently saying that you have four marks on this line chart. It's one row by one column, and it gives you the total sum of the co, of the cost; might be nice to view that on occasion. Now the four marks it's talking about—if I hover over the left end of the line, I'll see the first mark—and it also shows the legend, excuse me, the tool tip when you're hovering. There's the second one, third, and fourth. Let's give this viz a bit more detail by adding another dimension and another measure to it. So what I'm going to do is I'm going to double-click the profit measure, and I am going to double-click Market segment, and both of them end up in rows. Market segment goes before the calculations, and so now we've given it more detail in the chart. Now what you're seeing here is—and you still have your quarters of order date at the bottom—but what you're seeing here is each market segment, and then it's cost and its profit, even though we're going to focus on formatting visualizations in module 6, we'll make this one more visually appealing and give end users the ability to interact with it. So the first thing we're going to do is we're going to go over to the upper right and we're going to click on Show Me to expand that panel, and we're going to select a different type of line chart; it's called the dual lines chart. I'm pointing to it on my screen right now, dual lines. So let's select that type of chart, and you can see the change immediately. Um, you can do control Z to undo, and so what it's doing—if you do control Y to redo—it's, it's showing it got rid of the co, the profit on the left axis, so it has two lines; it's showing the cost on the, on the axis over here. If you do control Z again, you'll see that it has the profit and the cost separated and the lines are in different panes. So what this does—I'm going to control Y again, redo—what this does is it puts both of the lines in the same pane, and you can hover over the line to see which one is for cost and which one is for profit. Now go ahead and collapse Show Me, and we'd like to see a legend for this chart. We're going to go to the analysis menu, hover over Legends, and the only one that's available to you is a color legend based on the measure names. So we're going to go ahead and select that. So you see on the right side you have your legend. Now we want to change the colors of our lines, so we can go to the drop-down on the upper right of the legend, and we're going to choose Edit colors. And the first thing we're going to do is select a color palette. The color palette I'm looking for is Lightning Watermelon; it has both a red and a green color in there, which is what I'm looking for. So on the left side, we're going to click on cost, and we're going to give cost the deepest red color, and then click on profit, and mine is already green, but I'm going to just click on the green under this color palette, and we can apply at the bottom, and you'll see it updates both on your dual line visualization as well as on the legend, and you can go ahead and close that dialogue box. So we'd like to have more granularity in our visualization, so we're going to go up and right-click on quarter order date in columns, and we're going to change it to the second month. And the reason why I'm using that one is the second one on the list shows the month and the year. So now we're getting more level of detail information.
Here because it's going by months instead of quarters, and the other thing that we're going to do here is to give your end users some interactivity with the viz. That's why we're going to apply a filter; we're actually going to show a filter card. So, right-click on month order date and choose show filter. The filter card shows over on the right, right above the legend, and end users can use the slider to change and look at different details. The easiest way to clear a filter from the filter card is to look in its upper right-hand corner; there's a funnel with an X. We're going to click that, and it clears the filter. Go ahead and save your workbook.
To add more visual appeal, we're going to change the background color of the sheet itself. So, I'm just going to right-click in a blank area of the viz and choose format to open that pane on the left side of the screen. Right underneath where it says format font, we're going to select the third icon, the Paint Bucket, which is for shading. Notice the worksheet default is white. We're going to do the drop-down there and go to more colors. In the select color dialog, select the lightest color green that you see. Then, on the right side in the palette, I'm going to drag that marker that's there—I'm going to click and hold and start dragging it down. I want the color to be somewhat light and kind of washed out looking, and I'm going to click okay, okay at the bottom. So now this viz is more appealing than the one that we had with the white background. Changing the sheet color also caused—if you look on the right—it caused the measure names legend, its body of it, to have that same color. So, just so everything kind of matches, we're going to change the color of the month order date filter to the same color. I'm going to do that by going to the drop-down arrow at the top right corner of it and choosing format filter and set controls. Then, on the left side where it says shading, the last color you pick should be on the first one on the list, right above more colors. So, I'm going to select that color, and now at least they both match on the right side. Go ahead and save your file again.
And then we're going to start creating parameters. Now we're going to create parameters. Remember, parameters are variable placeholders. The beauty of using parameters is that you can show parameter controls on a viz, and users can select the measures to be used on both axes in the visualization. So, typically when you create a parameter, it's then referenced in a calculated field. In this lesson, we're going to create two parameters and two calculated fields. To get started, we're going to go over and close the format filter and set controls pane—oops—so we get back to our data pane. At the top of the data pane, to the right of your search box, you have your funnel for filtering; you have your view data grid, and to the right of that you have a drop-down arrow. We're going to use that arrow and select create parameter. We're going to name this parameter Choice One selector, and that's how we're going to reference it in a calculated field. Under properties for the data type, we're going to change it from to string. Then, at the bottom where it says allowable values, we're going to select the option button for list, so you get a value display as table underneath, and you're going to click where it says click to add. Our first value here is going to be discount, and when you press your tab key, you'll see the display as is the same, and it gives you another click to add box. The second one is going to be profit, then we have quantity, and lastly we're going to put in sales. So, we've named our parameter, we gave it the data type that we desire, and we populated the allowable values for that parameter—four of them—and we're ready to click okay at the bottom. So, you'll notice at the bottom of your data pane, in the parameter section, you'll see your choice one selector, and we are going to duplicate it so we create our second parameter. So, I'm going to right-click on that, and I'm going to choose duplicate. So now we have Choice One selector (copy). I'm going to right-click on that and edit. So, we're going to get rid of the word copy in parentheses at the end of the name and change the name of this one. So, notice as soon as we got rid of copy, it lets us know that we already have a parameter named Choice One selector, and it turns red. You can't have two with the same name. We're going to change that one to the number two, and in this one we don't have to change anything else; we're using the same values, so we're going to click okay. And now we're going to create the first of our two calculated fields. We can go to the drop-down arrow at the top of the data pane again, and this time select create calculated field. And this one—oops, not mean to do that, let me move this box over—so we're going to give the calculated field a name, and this is going to be Placeholder and the number one, and then we're going to click in the text box there, and we're going to type in this calculation. Um, I'm going to get it typed in on my screen, and then you guys will be able to pause and get it typed in on your screen. So, go ahead and type in what I typed in—the case statement that I typed in. You can pause the video to keep it on your screen. When you're done, then we'll discuss the statement. A case statement is very similar to the if then else if else construct. So, what this is saying is when discount is selected in the Choice One selector parameter, then display the discount field; if profit is selected in that selector, that parameter, then display a profit field, so on and so forth. So, we're going to go ahead and notice, before we go ahead, in the bottom it will let you know very clearly whether a calculation is valid or not. We're going to go ahead and click okay. So now, if you look in the orders table, you'll see Placeholder One, and we are going to right-click on it, and we're going to duplicate that calculated field. We're going to right-click on its copy and edit, and we're going to change the name—going to get rid of copy and just name this one Placeholder Two. The other thing we have to change in here is that case statement. The first line we're going to change it to Choice Two selector, and then we can click okay.
So now we're going to pull it all together. Let's go ahead and create a new sheet. On the new sheet, we're going to drag Placeholder Two to columns, and we're going to drag Placeholder One to rows. Let's drag Customer Last to the marks card on the detail section and drop it there. And then we're going to drag Region to the color card on marks—oops, I dragged Profit there. Yeah, this is where you ignore your trainer. Let me grab Region and drag that to color. In the data pane, we're going to right-click on each of our parameters. So, I'm going to right-click on Choice One selector, and I'm going to choose show parameter, and I'm going to do the same with Choice Two. And so, over on the right side, the end user can choose what they're looking at in this bubble chart. So, right now both of these are on discount, right? So, if I hover over any of the marks, you'll see that both Placeholder One and Placeholder Two are both showing the same value, because it's the discount. So, Choice One selector, I'm going to leave on discount, and I'm going to go to Choice Two selector and choose profit. So now my bubble chart updates, and when I hover over a mark, I'll see Placeholder One, the value of the discount, and Placeholder Two, the value of the profit. And so, end users can choose any combinations between the four. I'm going to look at quantity in one and sales in two now to be able to interact with the data and view what they need to see. So, we created two parameters by duplicating the first one, and then we reference them in calculated fields by duplicating the first calculated field. So, let's change our placeholders so they're not aggregated, and we can do that by going to the analysis menu and unchecking or clicking on aggregate measures to uncheck it. Now you'll notice, as you're making changes in your Choice One and Choice Two selectors, that the axis titles are not updating. In order to make them update, unfortunately they won't update dynamically in Tableau, but you can create a calculated field to make it update, and that's what we're going to do now. So, I'm going to go to the drop-down at the top of the data pane and select create calculated field again, and I'm going to name this one X-Axis Title. Oh, my casing is off. And then, title. Now I'll go ahead and get the case statement in here, and then you can pause this video and get it into your own. This case statement is saying when they select the text field, right, discount, then the axis title will display discount, so on and so forth. There's an else null statement in there, so I just threw that in there; it's not going to make a difference with these selectors. In other words, even when they're just sitting there default, they have something selected, so there'll never be never be a situation when it is empty, when one of the selectors is empty or both of them, but if they were, it would display null as the axis title. So, go ahead and click okay, and copy this or duplicate this calculated field and change the name to Y-Axis Title and change the case to Choice One selector, and when you're done, that calculated field should look like the one on my screen. Go ahead and click okay. So, if we look in our data pane, we'll see both of those, and the way that we use them is we're going to drag them, but before before we do that, we want to get rid of Placeholder One and Placeholder Two titles. So, to do that, we're going to double-click on Placeholder One, and we're just going to go down to the title selected and delete and close that box and do the same for Placeholder Two. So now, all we have to do is we're going to drag the X-Axis Title calculated field to rows, and we're going to drag Y-Axis Title to columns, and notice, based on whatever you have in your choice selectors, that that's what's showing in the axis. So, one thing we're going to do is right-click on Sales in your x-axis and choose rotate label, and then right-click on x-axis title and choose hide field labels for columns. Oops, I meant to say hide field labels for rows there, but in either case, um, you're going to hide field labels for both rows and columns, right? And that gets rid of the Y-Axis Title and x-axis title that was showing over there. So now, go ahead and make some more choices in your selectors, and the appropriate axis should be updating. And then we're going to rename our titles on our selectors. So, I'm going to go to the Choice One selector drop-down arrow and choose edit title, and I'm going to call it First Choice and click okay and edit the second one, Choice Two selector, to say Second Choice and okay. So, yeah, pretty cool. So, so we had to create the two calculated fields to make those axis labels update automatically based on the choices that we have. Go ahead and save your file. Now, let's rename the sheet to Parameters and Calculated Fields, and again, that's for your future reference. And if we want, you know, when we do the sheet, you know, it gives the title; if you want to right-click, you can actually hide the title if you don't want it on the sheet. And go ahead and create a new sheet.
Let's start by renaming the title from Sheet whatever number it is—Sheet 11 in my case—where you're going to name the title Key Performance Indicators and click okay. And then let's name the sheet tab KPIs, which they're normally referred to as KPIs. So, just a reminder, the key performance indicator is a measurable value that shows how effectively a company or other entity is achieving key business objectives. So, the first step in creating a KPI is to create a view that includes the field that you want to assess. In our case, the field is Sales, all right? So, what we're going to do is we're going to double-click Subcategory underneath Product in the orders table, and it goes to rows, and we're going to double-click Region, and that goes into columns. So, it just created this little table situation for us. Now we're going to grab the Sales field, and we're going to drag it to the text—to text on the marks card—drop it on text. So that's the first step, where we're having the field that we want to assess in the view, as well as some other dimensions, but we have the field in the view, the Sales field. The second step is creating the KPI's threshold, and that demarcates success from failure in the KPI, and we do that via a calculated field. So, so another way to get to a calculated field here is to go up to the analysis menu, and you can choose create calculated field from there. As usual, I will get the function in, and then you can pause and get it in on your screen, and then we'll discuss it after you get it in. So, we're using the if then else construct. So, if the sum of Sales is greater than 25,000, then we want the text above Benchmark; if it's not, we want it the text to be below Benchmark. Now, I split this up over three different lines. I like to have my if and my end statements in the same margin, if you will, and I don't want to ever be in a situation where I have to scroll across or try to arrow across to see a whole calculation, so I typically split them up like that. Now, while we're in here, I will show you this: if I'm anywhere within that calculation, you see this little right arrow on the right side. If I click on that, it gives me examples—well, the syntax of the expression—and it lets you know what that function does, and then it gives you an example. So, for any of the functions that are in here, you can get that information when you're doing a calculated field. And I'm going to just do the left arrow to collapse that, and I'm going to click okay. The third and final step in this process is to update the view to use KPI-specific shape marks. To do that, in the marks card, where it says Automatic, we're going to do the drop-down and select Shape, and then we're going to drag our KPI from the data pane and drop it on top of Shape in the marks card. And so, it may have put some default shapes on your table here, and we're going to fix that. Now, normally it would open the edit shape box as soon as you do that, but if it didn't, I can just click on Shape in the marks card to get the edit shape box open. Now, over on the right, where it says Select Shape Palette, we're going to do the drop-down and select KPI. You're going to click on the left—click on above Benchmark—and we're going to do the green check mark for below Benchmark; we're going to use the red X, and we're going to apply at the bottom and click okay. If it did not display a legend for you on the right, you're going to go to the analysis tab—excuse me, the analysis menu—hover over Legends, and you'll notice this time Shape Legend KPI is the only one available. Go ahead and select that, so you get your legend. And now what we're going to do is we just want our KPI marks in this table. So, in your marks pane, you you're going to drag Sum of Sales into Detail—drop it on top of Detail in the marks pane—and now we're just seeing our KPR—our KPI marks—and at the top of the table, right-click on Region, People One, and hide field labels for columns; we don't need that there. Go ahead and save your workbook.
Our last hands-on lesson in this module is ad hoc calculations. So, we're going to go ahead and create a new worksheet here, and go ahead and drag Market—or double-click on Market Segment—we want it in rows. Now, what we're going to do—so remember, in ad hoc calculation—is also known as an inline calculation—it's like when you just want to do a calculation. And what we're going to do is we're going to double-click in the blank space in the column shelf, and notice it gives us that long box that to work in, right? So, it says drag Dimensions or measures here, which we've been doing; we've been dragging or double-clicking dimensions and measures to get them in columns and rows, and it also says or double-click to start a new calculation, and that's what we did; we're double-clicking there, and we're going to do an ad hoc calculation. So, I'd like you to type AVG, and when average pops up, go ahead and press your tab key when it's selected, and then we're going to type Profit—start typing profit and grab it off the list—and tab it in. And now we're going to do a divisional slash—type AVG again—tab it in; this time type Sales and tab that in. So, we're saying average profit divided by average sales, and that gives us the average profit ratio; that's what that calculation will do. So, it's letting you know at the end of it to do control enter to apply it. So, there's your average profit divided by average sales, in other words, the average profit ratio. Now, we're going to right-click anywhere within our visualization and go to format, and the format pane opens on the left, and where it says Fields to the right of, you know, the font and the Paint Bucket, we're going to do the drop-down next to Field, and we're going to choose our ad hoc calculation, and we want to format its numbers to percentages. So, right under Scale, I'm going to go to Numbers and choose Percentage, and we can make it zero decimal places and click out of there, and we can close that format pane, and we're going to name this sheet AVG for Average Profit Ratio Per Segment and press enter and save your workbook.
So, the last lesson in this module is performance considerations with different types of calculations. So, your basic expressions, your row-level, and your aggregate calculations, they're generated as part of the query to the underlying data source and are calculated in the database, and they scale very well. So, basic expressions are thumbs up; they're cool. Then you have your level of detail expressions. There's two two different panels here with performance considerations for those. So, they're also generated as part of the query to the underlying data source, and they're also calculated in the database. They are expressed as a nested select. So, if you know kind of um SQL select statements, it's a select statement within a select statement, and so they are dependent on database performance. A table calculation or blending might perform better than an LOD expression, or vice versa; it just depends on the data, and you would want to assume referential integrity for joins if your queries run slowly when you use these expressions. Now, we also have some more performance considerations here. So, when you're dealing with booleans and integers, when you create calculated fields, the data type you use has a significant impact on the calculation speed. Integers and booleans are generally much faster than strings. So, of course, we use strings, right, in our calculated field. If your calculation produces a binary result, for example, yes/no, pass/fail, over/under, be sure to return a Boolean result rather than a string. When it comes to parameters, a common technique is to show a parameter control, and you guys have seen that, so users can select a value that determines how a calculation is performed. Typically, to give the user easy-to-understand options, it makes sense to create the parameter as a string type. I believe we did that, but numerical calculations are much faster than string calculations. So, take advantage of the display as feature of parameters—that is, show text labels—but use underlying integer values for the calculation logic. Now, these come into play when you're dealing with huge huge data sets. We haven't had any performance issues up to now in what we've been doing in our calculations. So, remember this slide deck is also in the files for the video description for…
Your future reference, and then other considerations would be to convert data fields as necessary. Use else if logic statements; we used an else statement, not an if and not an else if, and to aggregate measures. So we got a lot accomplished in Module 4 by using row-level and aggregate calculations. Um, we began this module by learning about the three levels of calculations in Tableau and reviewed some module definitions. We got hands-on by creating row-level calculations and aggregate calculations, which both fall into the basic expressions level of calculations. Row-level calculations are created at the data source level of detail, and aggregate calculations are at the visualization level of detail. We moved on to creating parameters and calculated fields that reference them and learned how to make the axis labels update based on parameter selections. We went through the three steps necessary to create key performance indicators and then created an ad hoc calculation. We ended by reviewing some performance considerations to keep in mind as you continue to work in Tableau.
In Module 4, you were introduced to the three levels of calculations in Tableau. In this module, we're going to focus on table calculations, which are the third level of calculations in Tableau. So our first lesson will be an overview of table calculations. When we get hands-on, we'll be using what are known as quick table calculations. You'll learn about scope and direction and how they relate to addressing and partitioning, and then we'll move on to creating advanced table calculations. Throughout, we'll be using some practical examples. So just a quick description here: table calculations allow you to transform values at the level of detail of the visualization only; that's what they are.
When we're ready to get hands-on again in Tableau, we'll start with quick table calculations. These allow you to quickly apply a common table calculation to your visualization using the most typical settings for that calculation type. On this slide, I have a list of the quick table calculations that are available in Tableau. So everything from running totals, difference, percent of total, percent difference, rank, moving average—all of these are quick table calculations. So let's switch back over to Tableau and get started. We're going to continue to use our sample Superstore live workbook, and let's go ahead and create a new worksheet.
So on this worksheet, we're going to drag order date to columns, and we're going to drag State/Province to rows, and it gives us our table, also known as cross-tab format. Now we're going to drag our sales measure to the text box on the marks card, and we're going to drag our profit measure to the color box on the marks card. So now we're seeing the sum of profit in color, and the sales are not colored in this table. Now the next thing we're going to do, just to make it stand out a little bit more, we're going to go to the mark type dropdown—so where it says automatic on your marks card—and we're going to choose square. So we'll place squares around those values, making them a little bit more visible. Notice, because we dragged profit to color, it gives us a color legend on the right. Now we're ready to add our quick table calculation. So in the marks card, we're going to right-click on sum of profit, and we're going to go down and hover over quick table calculation and click on difference.
Let's hover over the Colorado 2019 value, and you'll see the tooltip. It gives you the state and province, the year of the order date, and then it says difference in profit from the previous along table across. So you'll learn the detail about that in a moment, but what it's doing is it's going across the table, and then it'll go down to the next row and go across that row of the table. So when I hover on that first number, the difference in profit from the previous along table is empty because there's nothing previous to this. If we had 2018 there, then it would show a difference in profit. If we look at the next one, the Colorado for 2020, that one has a $249 difference in profit from Colorado in 2019, and it shows the sales value as well, which is showing in the cell. So you can continue to look at it like that. Let's go ahead and name this sheet "Sales by State with Profit Difference" and press Enter.
Now, if you look at that quick table calculation—oh, let me point this out before we go there—you'll notice in the marks card that the sum of profit has the delta symbol on it, which conveys that it has a table calculation applied to that measure. If we want to see the calculation window, we can right-click on sum of profit in the marks card, and we could go to edit table calculation. So it's showing the calculation type we said difference, right, and it's showing the direction that it's going, and we can close that table calculation box. So when you create—when you use a quick table calculation—you can go in and edit it, and a lot of times people will start with a quick table calculation and then decide if they need to edit it and change its direction or other information. Let's go ahead and save this file.
So when you add a table calculation, you must use all dimensions in the level of detail either for partitioning or for addressing. Before we go in and start creating table calculations, you need to have this background information. Partitioning is known as scoping—the dimensions that define how to group the calculation. The scope of data it is performed on are called partitioning fields. The calculation is performed separately on each partition. And then you have addressing, which is also known as direction. The remaining dimensions upon which the table calculation is performed are called addressing fields and determine the direction of the calculation. So we saw when we went and edited our quick table calculation and even when we looked at the tooltip that it was using table across as the direction, so and the partitioning of it was the table itself—the scoping.
Now, just to give you examples of these: table across computes across the length of the table and restarts after every partition, and there's an example of that on the screen. So it will go across and perform the calculation on all January's numbers going across, and then it will come down to February and do those numbers for the entire table. The next one is table down. So in this example, it computes down the length of the table and restarts after every partition. So this one, it will use the computation for all of 2011 from top to bottom, and then it will start over again with 2012. Oops. Then we have table across then down; it computes across the length of the table and then down the length of the table. So in this example, it will go all the way across January for quarter 1, and then it will go down and go across February, and it will keep going down and across, or across and then down the length of the table. The next one is table down then across. In this case, it goes down to 2011, and then it will go across to 2012 and down so on and so forth, as you can see on this graphic. And then we have pane down; it computes down an entire pane. So you see it's in the quarter 1 pane; it will go down that pane, and then you have pane across then down; it will go across the entire pane and then down the pane before moving to the next pane, I should say. And this one is pane down then across; it computes down and then across the pane. We have cell; it computes within a single cell. And then we have specific dimensions; that computes only within the dimensions you specify. If all the dimensions are selected, then the entire table is in scope.
So if you look at this screenshot here, this graphic, you'll see that underneath—and so with your compute using—it has all of those that we just covered, table across through cell. When you have specific dimensions selected, you can select the dimensions that you want it to calculate across or down. And so in this example, month of order date is calculated, and then year—excuse me, quarter of order date—would be calculated in that order, and we'll talk about at the level on the next slide. So at the level is only available when specific dimension is selected. Deepest means the calculation should be performed at the deepest level of granularity. The other choices underneath that would be quarter of order date, and then the calculation should be performed at the quarter level, or month of order date, where the calculation should be performed at the month level. So I don't have a screen grab of what the dropdown next to deepest, but that's what it would show in this example.
So now we're ready to start doing our table calculations. I already created a new sheet, and I dragged order date to the Rows shelf. Now in the Rows shelf, I'm going to click the plus sign in front of year of order date, and it gives me the quarter. And on the quarter 1, I'm going to click the plus sign, so I get the month. So right now you should have year, quarter, and month of order date on the Rows shelf. Now we decide that we want the quarter and the month to be in rows, but we want the year to be in columns. So I'm going to just drag and drop year of order date up to the Columns shelf, and then we're going to drag the sales measure to text on the marks card like we did for our quick table calculation, but we also used profit there, and we're not doing that here. So we're seeing the sales broken down by year, quarter, and month, and now we're ready for our table calculation. So I'm going to just right-click sum of sales in the marks card and go to add table calculation. So if defaults to the calculation type difference from; it defaults compute using table across, and what we are going to select for right now, we're going to select pane across then down for our compute using, and we're going to leave it on difference from for right now. If you do the dropdown there, you'll see those are the same ones that you have for quick table calculations as well; they're the same; quick table calculation just uses default settings. You can then go and edit them, but a table calculation you can set it up the way you want it while you're creating it, and then we can just close that box because it's already done it.
So hover over the 2020 January figure, and it says the difference in sales from the previous is 9,37. There's nothing there showing currently for the previous, but the truth of the matter is the previous one is blocked out. If you hover over it, it doesn't show you what the sales are, but I actually took note of what these sales were. So for January 2019, the sales were 77. So for January of 2020, the sales were actually 9384. So it's showing the difference in sales, which is 9307. So we're in the pane; the pane in this case is quarter 1, and we selected across and then down. So as you keep going across, you'll see the previous differences, which are showing in the cells, and then it goes down, and then it goes across, and then it goes—goes down, and then it goes across. So that is what that is showing you. So if you want to make a note, I'll give you the actual sales numbers for January and February for the quarter 1 pane, and the actual sales numbers starting with January 2019 and going across would be 77, 9384, 3567, and 1858. And then for February 2019, it's 23 going across, 4417, 90, and 21,42.
Now, before we do our next table calculation, let's rename this sheet, and this one we will call "Difference from Previous Sales," and we'll leave that as the title as well. Now, the one thing we want to do in here is we want to format the numbers, and we want to give them a custom number format so that positive numbers—well, let me put it like this—so that negative numbers will show in parentheses. And so we're going to right-click on sum of sales in the marks card, and notice it has that delta symbol. So whether it's a quick table calculation or a regular table calculation, the measure will have the delta symbol, and we're going to right-click on that, and we're going to go to format. And on the format pane that opens on the left under default, we're going to do the dropdown for number, and we're going to choose custom. And in the format text box on the right side, you're going to type a dollar sign, a pound sign, comma, three more pound signs, and then a semicolon. So that's how the positive numbers are going to display, right? We're not having any decimals; it's going to have a—after the first number or first two numbers, however many there are, and then three more numbers afterwards. The semicolon separates the format. So now we're going to give it the negative number format; we're going to type an open parenthesis, and we'll do a dollar sign. Now you could put the minus sign there for negative, but I think because it's in parentheses, that's kind of redundant, and we're going to repeat the same format—so the pound sign, comma, pound pound pound—and then close the parentheses. And you can see that it's already done it. So our positive numbers are not in parentheses; our negative numbers are. And I'll show you if I put the dollar sign after—excuse me—if I put the minus sign after the negative dollar sign, you can see how that looks, and if you want it to look like that, you can keep it like that. I prefer it not there, so I'm going to get rid of it, and I'm going to just click away from the format, and I'm going to close the format pane, and now I'm going to save the file.
Again, we're going to create another table calculation, but before we do that, I just want to talk to you about it for a moment. I'm going to show you a little trick that I use. When we did this one, I had the original sales numbers, and I gave you them for January and February in this data set so that you can compare and see that the differences that are being represented in the table are correct. Now I'm going to show you how you'll have a reference so you can—when you use a table calculation—you can refer to the original numbers. You know, in Tableau, you can't have multiple visualizations on the same sheet; you can with a dashboard, but while you're building the sheet, sometimes that information might be useful for you. So let's go ahead and create a new sheet. We want the year and the quarter of the order date in columns and the region and category to rows. Go ahead and set that up and drag the sales measure to text on the marks card to populate the table. So now—now what we're going to do is we're going to just name this sheet "Actual Sales." Having problems getting my taskbar to move; there we go. "Actual Sales," okay. Now we're going to duplicate that sheet, and so we have everything on it—on the duplicate—except the table calculation that we want to use, which is a running total. Right-click on your sum of sales in the mark card and click on Add Table Calculation. For the calculation type, we're going to do the dropdown, and it's going to be running total, and it defaults to table across, and let's leave it on that default for right now. We're going to do the X to close that dialog box. So it's doing a running total for the entire table by—by going across each row and then navigating down to the next row so on and so forth. But what you're seeing there is in your tooltip you're seeing the running sum of sales, right? And so if you go back to your—your actual sales sheet—you'll see that quarter three for the central region for furniture for 2019 is the first quarter that's populated, and that's 106, and quarter 4 is 1354. When I go back to the next sheet, I can see the 106, and then I see the running total, which is 106 + 1354. So that's a way that you can actually have the raw data, so to speak, so that you can just check and make sure that the calculations are correct, and they almost always are. And now on our sheet with the running total on it, we're going to right-click on sum of sales in the marks card, and we're going to edit the table calculation, and this time we're going to select specific dimensions, and the year of order date and the quarter of order date are already selected. So we're telling it which dimensions to calculate on in that order. Underneath that, where it says restarting every, and it defaults to None, we're going to do the dropdown and select year of order date. So we're telling it to calculate the running total for the year and quarter of order date and restart for every year, and it's already updated it in the background. I mean, I can move that out of the way, right? So we said specific dimensions, and it's doing it for every year and quarter of order date, and then it will move to the next year and quarter of order date as opposed to just doing table across, which is what we had before. For this one, we're going to edit the title, and we're going to get rid of that sheet name placeholder in there, and we'll call it "Running Totals by Year per Region and Category," and then we'll just name the sheet tab "Running Totals." And if you want to put quick calculation for future reference, you can go ahead and format the numbers as currency with no decimal places, and your table should look like mine. Go ahead and save your workbook, and we'll do another quick table calculation.
So go ahead and create a new worksheet for this one. Let's build a table with category in columns, month of order date in rows, and sales as text, and your worksheet should look like mine at this point. And now we're going to add a table calculation, and we're going to do a running total again. So I'm going to right-click on sum of sales in the marks card, add table calculation, select—select the type, and then I'm going to use table down under compute using, and I'm going to close that dialog box. So you can see it's doing a running total; it's going down one column, then it starts at the top of the next column. So this is really like a running total of—for each category. If you hover over any figure, it says running sum of sales along table down. All right, okay. We're going to change that. Go ahead and right-click on your sum of sales in the marks card; we're going to hover over compute using, and we want to choose table down then across. And so now you see it's changed it; it's going down the first column, then across to the top of the second column; it's like doing a running total not per category but for the entire table in this way, and that way you ultimately see the total amount of sales that's going to be in that last cell underneath technology; that's the total sales amount. Let's go ahead and format our numbers so that their currency with zero decimal places, and we can name this sheet—uh, we'll name the sheet "Another Table Calculation," and I actually had us misname the previous sheet. If you—added on that quick table calculation for the previous sheet, it's just a table calculation. If you want to edit that one—me finish spelling "another" correctly here—and I'm just renaming the previous one so it doesn't say "quick calculation"; it says "table calculation" there, and we can save the file. We should probably edit the title on this one, and we're actually going to—um—change the name of the sheet as well. So this one we're going to edit the title first; instead of "Another Table Calculation," we're going to call it "Running Totals - Entire Table," and then for the sheet tab we're going to edit that to say—we can get rid of "another" and have "Table Calculation," and at the end of that we'll do "Running Totals Entire Table." All right, let's do a new sheet because we're going to do another—not quick—I keep saying quick—we're going to do another table calculation, and it will allow you to add a secondary calculation. So for this one, we're going to drag State to columns—State/Province to columns—if I can drag here—and we're going to do Market Segment for rows, and then for our state we're going to right-click on State in the Columns shelf and choose Filter, and we are going to—at the bottom of that—select From List; we're going to choose None, so it deselects everything, and we're going to select Arizona, California, and Idaho. We'll grab that one, and then we're going to
Scroll down, and we want New Mexico, then Oregon and Washington, and then click okay. And we are going to drag sales to text—oh, it's already there—drag sales to text in the marks card. All right, so for this one, we're going to right-click on our sum of sales in the marks card, add table calculation. We're going to select running total again, and we're going to choose table down, then across, and then notice at the bottom it has add secondary calculation. Now, this is the thing—that checkbox may not always be there. For example, if you go to running total and do the dropdown and you select rank, then you don't get to add a secondary calculation. So the only calculation types that allow you to add a secondary calculation are running total and moving calculation. So we're on running total; we're going to check our—we have our table across then down already selected—we're going to recheck add secondary calculation, and it opens up a wider screen. So you have your primary calculation type as the running total. For our secondary calculation type, we're going to select percent difference from, and we're going to do table across then down again, and then we can close that box. So if you hover over any tooltip, it says percent difference in running sum of sales from the previous along table across then down. So it's combining them; it's the percent difference in that running total sum of sales from the previous one.
Now, the other thing we would want to do with this to give the end user some more flexibility is go ahead and right-click on State/Province again in your columns and choose show filter. So if they wanted to see different state groupings, or not groupings, but different states here, they can just check them in the the State/Province filter on the right-hand side. So this again is showing the percent difference in running totals, and we're going to edit the title, get rid of that sheet name placeholder, and we'll just name it Percent Difference in Sales Running Totals. And for the sheet, we're going to name this one Table Calculation-Secondary Cal secondary calculation and save your file.
By way of recap, we began module 5, Table Calculations, the same way we began our previous modules with an overview of what would be covered in the module and a definition of a quick table calculation and those available in Tableau. We created a quick table calculation which showed the difference in profit from previous profit values in a table, and the table included sales values and used a square shape to make values stand out. We then moved on to an overview of table calculations where you learned about partitioning, also known as scope, and addressing, also known as Direction fields. We created a table calculation that showed the difference in previous sales based on year, quarter, and month of the order date. We then created a custom number format to show negative values in parentheses. We created a table showing actual sales values so we could compare them to our next table calculation which showed running totals by year, per region and category. We did another table calculation showing the cumulative running totals for the table and ended by creating a table calculation with a secondary calculation added to it. You learned that only the running total and moving calculation types allow secondary calculations. Thank you for viewing this Tableau introductory course.
We're going to review, by way of conclusion, what we've covered in this extensive course. We move from foundational to Advanced visualizations in module 3, where we compared values across different dimensions, added dates to our visualizations, and learned how to relate parts of the data to the whole. That's when we got our first exposure to visualizing distributions and also visualizing multiple axes to compare different measures. In module 4, we moved into using row-level and aggregate calculations. First, we reviewed the three levels of calculation in Tableau, and then we created and edited calculations. You were able to create parameters in this module, and we created a key performance indicator visualization. We created ad hoc calculations right in the columns or rows shelf, and we reviewed some performance considerations to keep in mind. In module 5, we focused on table calculations, which are the third level of calculations in Tableau. We began with an overview, and then we used some quick table calculations, which of course can be edited. You learned about scope and Direction and how they relate to addressing and partitioning, and then we went into advanced table calculations, and throughout this module we used practical examples.
Welcome everyone. I'm Trish Conor, and this is Tableau Introduction. Tableau is a visual analytics platform that makes it easier for people to explore and manage data and faster to discover and share insights that can change businesses. It helps people and organizations be more data-driven. Tableau supports data prep, analysis, governance, collaboration, and more. This Tableau basic training course is designed as an introduction to Tableau for beginners. On completing the course, students will have a firm grasp of the basic techniques required to create visualizations and combine them in interactive dashboards. Specifically, students will meet the following learning outcomes, among others: formatting a visualization for appearance; adding value to analysis. Thank you for viewing this Tableau introductory course.
So we've done a little formatting here and there, but now we're really going to focus in module 6 on formatting a visualization to look great and work well. So in the first lesson, we'll go over some formatting considerations, and in the second lesson, we'll cover how formatting works in Tableau. Both of those are going to be on the slide. When we get to lesson 3, we will be hands-on for the rest of the module, adding value to visualizations. Let's review some formatting considerations before we get hands-on. As you change the look and feel of your work, use a biggest-to-smallest workflow. That means start by formatting fonts and titles at the workbook level, then move on to the worksheet level, say, formatting the individual parts of a view for last. A workbook is the largest possible container for formatting changes, and if you make changes at the workbook level first, it could save you time in terms of formatting visualizations. It is recommended that you use consistent coloring across them so your users have a visually appealing experience. As stated on the previous slide, you can format at the workbook level and the worksheet level; that's going from the largest inwards to the smallest parts, which are the individual parts of the view. So you can format them; for example, you can format a single field, you can resize cells and tables, you can edit individual axes, or all of this type of formatting in the in in the view portion is done from the format pane, and you've been exposed to the format pane already. So let's go ahead and get hands-on and focus on formatting in this module.
So now what we're going to do is we're going to navigate to a specific sheet. We have about 13 or 14 sheets, worksheets in this workbook at this point. So the easiest way to do this in Tableau is I'm going to point to these arrows right underneath the last, the current sheet name. So those are your navigational arrows. The first one will take you to the first sheet—well, it will scroll you so you can see the first sheet—the second one will move you over sheet by sheet to the left; the third one will move you over sheet by sheet to the right; and the last one will take you to the last sheet, which we're currently on. So what I'm going to do is I'm going to select the first one, and that brings the first sheet, the first few sheets into view, and I'm going to select the Sales by State/Market Segment sheet, and we're going to start by formatting the workbook. And to do that, we're going to go to the format menu and choose workbook. So the format pane opens on the left, like it typically does. At the top, it just says Format Workbook, and what we can format at the workbook level are the fonts and lines. So underneath fonts, we're going to change the font for all of the workbook objects: worksheets, tooltips, titles, dashboard titles, story titles. If we use all, all of those categories will change to the same thing. So we're going to go to the all dropdown, and we want to actually change the font. The default font is Tableau Book. You can do the dropdown next to the font, and there's a lot of different fonts that you can choose from in Tableau. I'm going to scroll all the way down to the bottom, and I'm going to choose Zilla Slab Medium, and notice that it updated already on this sheet that we're on; it also updated for the entire workbook. So if I go to the next sheet, Profit Over Time, I see that it has that same Zilla Slab Medium font. I'm going to go back to Sales by State and Market Segment. Notice that it carried that Zilla Slab Medium all the way down to worksheets, tooltips, so on and so forth. And we decide that we want a consistent color for our fonts throughout the workbook, so we're going to go back to the all dropdown, and in the color grid you're going to select the darkest green color that you can see, and we're going to make the font—and you can do this over to the right—we're going to make the font for all, and then at the worksheet level in the format pane we're going to make the font larger. So we're going to change the nine to 12 point at the worksheet level, and you can see the changes immediately on this table. So notice that it has the titles are also in that dark green, and they're 15 point by default. We don't have any dashboard or story titles at this time. Now, the other thing you can format at the workbook level is you can format lines. So under lines, it just has grid lines, and you can do the dropdown and see that there are several other different line types. You, the dropdown next to More underneath grid lines, there are other line types that you can alter. I'm going to just do—if I look underneath the last one—I'm going to do less to collapse that, and we can go ahead and save our workbook.
Now, let's say you did a lot of formatting changes at the workbook level, and then you decide you don't like them; you want to go back to the original. All the way at the bottom, you have that Reset to Defaults button that you could click to get it back to the way it was originally. We're not going to click that now. At the visualization level on this sheet, we're going to make some formatting changes. Uh, the thir first thing we want to do is we want to right-click at the top where it says Market Segment/SL Category, right-click there and choose Hide Field Labels for Columns. We don't need that there; that's more of a cleanup move, but also considered formatting. And you notice how the Technology column, it's being cut off. So I'm going to put my mouse to the right of Technology in the Consumer or Consumer Market Segment, and I'm going to just drag, click and hold, and drag a little bit to the right. So now you can see the full word, and you only have to do it once, and it does it for your other panes. We're going to right-click on Market Seg M and choose Show Filter, so that filter shows up on the right. And we're going to do the same thing for State/Province, show the filter. Now, when you show the State/Province filter, go over to the filter panel on the right and do the dropdown to the right of State/Province, and notice it defaults to a multiple values list. We're going to select Multiple Values dropdown so it doesn't doesn't take as much room in that filter panel on the right. And now we're going to go to the dropdown again next to State/Province filter in the right pane, and we're going to choose Format Filter and Set Controls, and in the formatting pane on the left we're going to change the body shading to dark green, and we're going to change the font to white, and you can see that it formatted both of those filters in the right pane: dark green body with white font. Something else that will give your users more functionality um is you can hover over the State/Province column heading, and you'll see the little plus sign above it. When you click that, it now shows the city level of detail. If you—now it's a minus sign—if you click it, it goes goes back to State, and that's the same as clicking the the plus sign in the Rows shelf, but if you were to include this viz on a dashboard, the Columns and Rows shelf won't be there, so that's another way to teach your users how to expand to get more detail.
Now, the next thing we're going to do before we continue formatting this table is we want to add the grand totals for rows and columns s to this table, and to do that we're going to go to the analytics pane on the left, and you're going to click and hold on Totals and start dragging it over to your table, and you'll see the Add Totals pop up. We're going to drop it in Column Grand Totals, and so if you look at the bottom of your table, you have a grand total for every column. We're going to drag Totals over again, and this time drop it on Row Grand Totals, and now to the right we have a grand total for every row, and that one we want to rename. So we're going to right-click on the grand total column heading, and we're going to choose Format, and that opens on the left, and you'll see the Label at the bottom underneath Grand Totals. At the end of Grand Total, you're going to change it to Grand Totals by State and press Enter, and you'll see it update. So now let's take a look at the Analysis menu, and when you access it, hover over Totals. So we could have done our grand totals here. Um, you see both Row and Column Grand Totals are checked. You can change the position of your row and column totals if you'd like. Um, you can add subtotals here, and you can also change the aggregate calculation that's being used. It defaults to automatic, which is sum, but if you wanted an average, minimum, or maximum, you could get that as well, and we can click away from that menu. So now we're going to give our worksheet a color, and we want to give it like a light gray background shading. So I'm going to just right-click anywhere in my table and go to Format, and over on the left we're going to choose the Paint Bucket to get to shading, and for the worksheet we're going to do the dropdown, and I'm going to select the lightest gray color, the one right underneath white, just for a little bit of contrast. And the last thing we're going to do here is we're going to select a workbook theme, and so again it's called Workbook Theme, so it applies to the entire workbook, and we do that by going to the Format menu, and almost at the bottom we're going to select Workbook Theme, or hover over it, and let's look at Classic first. So you can see what the Classic theme does; it um centers the the title; it also got rid of the word wrap for like Office Supplies, I think that was there before; it shaded the first column; it made the Grand Totals bold. So that is the Classic theme. We're going to go back to Format Workbook B Theme, and let's choose Modern. So the Modern theme gets rid of the shading in the first column and the bold Grand Totals; it basically centers the title, and it doesn't get rid of the word wrap for the Office Supplies column. Now, if we like this theme and we want to get rid of the word wrap, we can just expand that column with by dragging, putting your mouse on the divider line between Office Supplies/Technology and dragging just a little bit to the right. And I might have dragged it a little bit too much, so I'm going to drag it back; I don't want it to be any wider than it needs to be. Um, and if by doing this it causes a scroll bar, which it does here at the bottom, I'll probably get rid of that and live with the word wrap when I can avoid it. I don't like having um scroll bars, so managed to size it so I got rid of the word wrap, and I don't have a scroll bar for this visualization, so kind of happy with that one, so I'm going to keep the Modern theme, and let's go ahead and save.
Let's go to our next sheet, Profit Over Time. This one we're just going to give it that same light gray background. So your Format Shading pane is still open on the left, and you can just go to your worksheet and select that palest gray color. And we want to change the line to green, in line with everything else that we've done. We're going for consistency here; you don't want to overwhelm your users with bunches of different colors in different visualizations, and so we're just going to go to the color box on the Marks card, and I'm going to select that darkest green color. Let's go to the next sheet and repeat the same process there, and notice that the fonts that we chose and the theme that we chose are applying to all of these sheets. We just have to do—that's why they say it's better to do it at the workbook level first because it saves you time; you don't have to do it on every sheet; you don't have to do certain things on every sheet. So repeat the same steps on the next sheet, Percentage of Total Sales by Region, and what's helpful and makes this more efficient is that that Format Shading pane will stay open until you close it. And on Sales by Profit and Quarter, we do want different color, different complimentary color lines because we're showing two measures here with our dual-axis chart. So we're going to just go ahead and give it the shading in our light gray shading, but then what we want to do is right-click on your Profit axis and choose Format, and we want to make this—you're going to do the font dropdown and make it bold, and do the same for your Sales axis, make that one bold as well. Go ahead and save your workbook.
So we're going to continue formatting some more sheets in this workbook, but as we move forward in the course, we'll do our formatting as we go. Now, a lot of times I like to create all my visualizations and then go back and do all the formatting, but in this case we'll we'll continue to format as we go when we proceed. So let's go to Aggregate Calculation sheet, and that's where I put that horrendous green background, and I'm going to change that to our lightest gray like we did before. The other thing I'm going to do on this sheet since I'm here is I want to format—well, let's do the dropdown um next to Measure Names filter in the right pane, and let's do Edit Title, and instead of Measure Names, we're going to call it Cost and Profit and click okay. And then we want to format them so it looks like this. Month of Order Date has that green format. I'm going to do the dropdown on Month of Order Date, and I'm going to do Format Filter and Set Controls, and I'm going to give it that dark green shading like we did on previous pages, and then I'm going to go to the font dropdown and choose white. So this one didn't do both at the same time. I'm going to go—so this one is not going to let me—well, edit colors, it'll let me do that, but Format Legends, yeah. So that one I have to go to Format Legends; that's interesting. It did both of them earlier, but now it's doing one at a time, but that's okay. So for the body, I'm going to do that dark green shading, and then for the font I'll make it white. Now they kind of match over there. All right, let's see what's in store for us on the Row-Level Calculation sheet. So this one, easy fix: you can just go to Color and change it to our group green, and then you know how to do your shading for the worksheet; you can go ahead and do that. Let's also edit the title on this one. So we're going to get rid of Sheet Name; we're going to leave it centered, and that's because of the Modern theme that we're using, and this one will be Sales by Year per Ship Mode, and do okay on that. So what I'm going to have you do is just pause the video, go through the remaining sheets, and use whatever formatting options you want to use, but just remember some of the basics: you want consistency, but play around with it. Um, we are not going to use any of these current…
Visualizations on the dashboard. We're going to create new ones in the next module, um, in which we'll create our dashboard. So go ahead and pause and just go ahead and do some formatting; play around with it.
So on my last sheet, I changed my State/Province filter so that it is a multiple value drop down, and then I formatted it so it has the dark green background and the white text. I formatted my column and row field labels as bold in this one as well, and I applied the gray background shading. Let's go ahead and save our workbook.
In module six, we focused on formatting a visualization to look great as well as work well. We made our visualization—our existing visualizations—more appealing and understandable. In this module, we started by reviewing formatting considerations and how formatting works in Tableau, and we learned that we should start at the outermost level, which is the workbook level, and then move on to the worksheet level and then the visualization level. And by doing that, we can save a lot of time. So we started with the workbook level by choosing a font and font color, and then we adjusted the font size at the worksheet level. We then learned how to add and format filters before adding grand totals and also formatting them. We learned how to apply shading at the worksheet level and then used the modern workbook theme, which applied to all of our sheets. We applied formatting to our other worksheets, even formatting axes. Then you had the opportunity to work on your own to format the remaining sheets in the workbook.
Now, sometimes, as I mentioned, I'd like to build out all of my worksheet visualizations, focusing on the data and how I want the visualization or what I want the visualization to be, and then I'll do a second pass and focus on formatting. Other people like to format as they go, and that's what we're going to do for the continuing modules in this course. Our seventh module is telling a data story with dashboards. So in this module, we'll start with dashboard objectives and definitions. Then, when we get hands-on, we'll start creating visualizations to use on our dashboard and/or story. Then we'll create a bet dashboard, add interactivity to a dashboard, create a story, and add story points. The objective of a dashboard is letting you compare a variety of data simultaneously, so it is a collection of several views, several worksheets, and it's an at-a-glance feature. Dashboards have actions that add context and interactivity. Users interact with your visualizations by selecting marks or hovering or clicking a menu, and the actions you set up can respond with navigation and changes in the view. There are five dashboard actions, and I'll tell you what they are in just a moment. A story is a sequence of visualizations that work together to convey information. It can be a series of dashboards and/or worksheets, and it's used to create a data narrative, provide context, demonstrate how decisions relate to outcomes, or simply make a compelling case. Each individual sheet in a story is known as a story point. And then we have the five actions, and you'll see some more, but you can filter, highlight, go to a URL, go to a sheet, or change set values via dashboard actions.
Now we're going to create the first of the four visualizations we're going to use on our dashboard. So let's go ahead and bring up a new worksheet, and on this one, we're going to want Order Date, Category, and Subcategory in columns, and then drag the Sales measure to rows. So now we have a column chart. You'll notice that it's showing the Order Date, the Category, and then the Subcategory, and the Order Dates and the Categories are showing at the top; it's broken out by the subcategories at the bottom. Let's drag Profit to Detail on the Marks card, and then when you hover over any mark in your column chart, you'll see that the value of profit is there for that category, subcategory, and year of Order Date, as well as the sales value. Let's right-click on Sum of Profit and show filter. So, of course, it shows up on the right, and I just want to show you a quick way. So it goes from a range of -22,000 and some more to positive 22,000. So what we're going to do is we want to filter for just a profit that's negative. If you—if I hover over the right-hand value and I click on it, it selects the whole thing. I'm going to type a zero and press Enter. So now our column chart has updated to just show the items with negative profit. If you hover over any of those marks, the profit is negative. And then we're going to use the funnel with the X to clear that filter. Let's also show filters for Order Date and let's see Subcategory, and for the Subcategory filter, let's make it a multiple drop down—multiple values drop down—and then we want to—to format those filters so that they match our previous formatting. So we're going to open up the Format Filter and Set Controls, and we're going to give it the dark green shading and the white text, just so we have consistency.
Now, at this point, we want to do the other typical formatting we've been doing. So we want our columns to be dark green; we want our sheet background to be the light gray. So go ahead and do your columns dark green and your sheet background to light gray, and again, that gives us consist—consist—consistency for our visualizations. Now, if you wanted to make different color choices, go ahead and do that, but just be consistent over these four visualizations that we're going to be putting on our dashboard.
Now we're going to add another dimension to our view, just temporarily; we want to do some investigating. So let's go ahead and put Region in the Row shelf in front of Sales, and then let's go over to our Sum of Profit filter, and we're going to do the drop down, and notice it defaults to a range of values. We're going to select At Most. Notice the first number is dimmed out; you can't change it. We're going to go click on the second number and let it select the whole thing, and we're going to type Min -5000 and press Enter. So we'll see if we hover over these columns here, right, and this is for Binders and Machines, the subcategories of Binders and Machines, but we'll see that the Central region has NE 22,000 and change profit for 2019, and we'll notice that the Eastern region has -7,000 in change for profit for 2020. So we're going to keep that in mind—the Central and Eastern regions—for our next visualization. What we're going to do in the meantime is we're going to go up to the Rows shelf, click on Region, and delete it. We're going to go back over to our—we're going to clear our Profit filter, and we're going to go back to its dropdown and change it back to Range of Values, and then go ahead and save your file.
Let's duplicate our Viz 1 sheet and name the sheet Viz 2. And on the Viz 2 sheet, we're going to drag Region to the Row shelf in front of Sum, and then we're going to right-click on Region and choose Filter. We're going to select None underneath the regions and then just check Central and East and click OK. Now we're going to go to our Sum of Profit, and if I do the drop down, it's still on Range of Values. We're going to do At Most; we're going to select the second number and type minus 5,000 and press Enter. And so we're just showing what we showed on the other Viz, right, but we just want to show the negative profit greater than 5,000. So let's right-click on the title and edit the title. We're going to select all by doing Control A, and we're going to type Negative Profit; we're going to do the greater than symbol, 5,000 by Region and Subcategory, and click OK. And on this one, we're going to go ahead and hide our Subcategory, Order Date, and Profit filters. So I'm going to just hide the card for each of them. And because we duplicated this, all of our formatting has come over as well, so we're good there. Go ahead and save your workbook.
Let's move on to our next visualization for the dashboard by creating another new sheet, and let's go ahead and name this sheet Viz 3. For this one, we're going to create a map with the sales by state, and then we'll have um profit values also show in the tooltip. So the first thing we're going to do is we're going to double-click on the State/Province field, and notice it puts it as Detail in the Marks card, and it also included the next level up in the hierarchy, which is Country/Region. If you look in columns and rows, you have Longitude generated and Latitude generated. So when you add geographic role type data, it automatically generates longitude and la—and latitude, and you can see that it's GE—assigned to Geographic role because of the globe to the left of the field. And let's drag Sales to Detail. So I kind of got it in there twice—one in Detail, one in Size. Let's drag Sales to Detail on the Marks card, and now we have the circles representing the sales. If we—we hover over a circle on the map, you'll see the Country/Region, State/Province, and the sum of the sales. Now we're going to drag Profit to Tooltip. Now when we hover, we can see the profit values as well. Let's show the Order Date filter and change the color of the filter to the dark green background with white text. We're also going to change the size and color of the marks on the map. So we're just going to—we're going to click on Size first, and we're going to adjust the size so they're slightly larger than they are now, and then we're going to click on Color and give them the dark green color. And I'm going to close that Format Filter and Set Control pane that I left open, and we're going to edit the title, and it's going to be Sales by State Map with Profit Values, and click OK. Let's go ahead and save our file before moving on to our next visualization. Um, I'm going to go ahead and format the sheet here with the same light gray shading. The map is taking up almost the whole view, but at the top and around the edges, you'll see that—that it's starkly white, and this is good for consistency sake. So I'm going to just right-click and go to Format, go to my paint bucket, and just use the regular light gray—lightest gray—that we've been using for the others, and we can go ahead now and duplicate this sheet for our next visualization. And I will say I know that I said we were going to only do four visualizations for the dashboard, but I thought of another one, so we're actually going to do five. Let's name the duplicated sheet Viz 4, and this one we're going to edit the title, and it's going to be Total Sales by Top 20 Cities, and click OK. And now we're going to drill down on the State field in the Marks card by clicking the plus sign in front of it, so that we get the City field to display in the map as well. And now when you hover over a mark, you have the City, Country, State, Profit, and Sales. Now all we need to do is apply a filter to the City field. So I'm going to right-click on City and go to Filter. So far we've—the General tab on the filter—there's also a Wildcard tab where you can say that it contains certain values, starts with, ends with, or exactly matches. You have a Condition tab at the top where you can give it a condition. So by field—um—might have Sales—we're not going to actually do this type of filter, but since I'm here, the Sum of Sales that's greater than some number, that would be a condition. We're going to just go back to the None option on that one, and we ultimately want to go to the Top tab. So Top—in—we're going to do by field. You can choose either Top or Bottom from the drop down; we're going to leave it on Top; we're going to change the 10 to a 20, and then where it says bu—and underneath that category—we're going to do the drop down and select Sales. So we want it to filter for the top 20 cities based on the sum of sales, and we're going to go ahead and click OK. Now I want to show you some of the map controls that are useful, and if you hover over the upper left corner of the map, you'll see the controls show up. If they don't show up, you can right-click on your map, go to Map Options, and then you would say Show View; you would make sure Show View Toolbar is checked. Now if I want to reset the map, I can use the push pin with the X on it. If I hover over the right-pointing arrow, the first one is Zoom—Zoom Area—the second one, the four-headed arrow, is Pan, and that's a useful one to use. If I have it on Pan, then I can actually drag the mouse—uh—the map around a little bit. Now we've applied a Top 20 filter, but I just want to show you something. Let's go over to the Year of Order Date and uncheck all and select 2019. 2019 doesn't have as many sales, so the top—it's not 20 cities that are showing here; it's the top however many cities. If I uncheck 2019 and check 2020, same thing. 2021, and then uncheck the other one, and then 2022. So they have varying numbers of sales. Let's put it back on All, and we're going to change the title to say instead of 20, we're going to say N, because depending on the filter that's applied, the number will vary, or we could even get rid of the N and just say Total Sales by Top Cities, and that—yeah, I think I'm going to do that—Edit Title and just get rid of the N placeholder for any number. Okay, and let's save our file again.
And for our last Viz for our dashboard—I promise this is the last one—we're going to create a new sheet and name the sheet Viz 5, and then we're going to drag Country/Region to Rows, and we're going to drag State/Province also to Rows, and I'll show you another way to add a—to add fields to the view. Let's right-click on the Sales field, and we're going to choose Add to Sheet, and that's the same as dragging it to Text on the Marks card. We're going to do the same with the Profit measure; add that to the sheet as well. Let's show the Order Date filter as well as the State/Province filter, and for the State/Province filter, let's make it a drop down. You're going to move the Order Date filter so it's on top; it's above the State/Province filter. So just get your four-headed arrow and drag it up until the black guideline is above State and Province. While you're over there, go ahead and format your filters the way we've been formatting them, so—and I'll make the font white, and then since all of our states—and notice we don't have Alaska and Hawaii on the list—our data doesn't include those two states. We decide we don't need to see the Country, so I'm going to just click on Country/Region in the Rows shelf and then delete. Then we want the Sales field to show up first—the Sales column—so I can click on the column heading, and when I put my mouse on the top of it, I can click and hold and then start dragging it. Now you'll see when it says you can't drop it—I'm going to point right in front of Profit and let go—so I can flip-flop those, and then we want to do our calculation—our formatting—on Sales. You know, we want the currency with no decimal places, and for Profit, we're going to do our custom number format, so the negatives are in parentheses. So I'm going to right-click on Sum of Sales in the Marks card under Measure Values, and I'm going to choose Format, and so for the Numbers, I'm going to just do drop down; I'm doing Currency Custom, so I can get rid of the decimal places, and then click away from that, and then I'm going to do the same thing on Sum of Profit, and I'm going to do the drop down for Numbers, choose Custom, click in the format box, and it's going to be dollar sign, pound, comma, pound, pound, pound; semicolon, open parenthesis, dollar sign, pound, comma, pound, pound, pound, closing parenthesis. So the negative numbers will be in parentheses for the Profit, and I decided not to do the dollar sign and the minus sign; the fact that they're in parentheses indicates to me it's a negative number. And I'm going to go ahead and close that pane, and now we just need to format the background of the sheet and give it a title. So I'm going to do my light gray background shading on the worksheet, and let's add a grand total at the bottom. So I'm going to go to the Analytics tab, grab Totals, start dragging it over, and it only allows me column grand totals; it can't do it by the row because there are two different fields there. So I'm getting the sales—total sales—at the bottom, total profit at the bottom, and edit—to edit the title to be Sales and Profit by State, and okay, and go ahead and save.
Now we're ready to create our first dashboard. Um, we're going to end up creating three dashboards, and then I'm going to give you the opportunity to create your own dashboard on your own, and I will do one on my own and show you mine at the end. So let's go ahead and do the—new dashboard box—and the first thing we're going to do is let's look at the Dashboard tab on the left; it's set to Default, which means to be viewed on a computer versus a phone. We're going to leave that; we're going to do the drop down next to Size, and I'm going to put in the size that fits my screen. It has to do what kind of monitor you have and the resolution and sizing of that and everything. So I'm going to make mine 1500 width and 900 height, and you can see my canvas area expanded, and then I'm going to collapse Size by clicking the arrow to the right of what's now Custom, and you have all the sheets in your workbook listed underneath, and you probably have to scroll because we have a lot of sheets in this workbook. And so when it's time for you to create a dashboard on your own, you can use any of the worksheets in the workbook for your dashboard. The ones that we're going to use for the three that we do together are Viz 1 through Viz 5. Underneath all your sheets, you have an Object panel, so you might want to put text, you know, add more text or link to a web page, that kind of stuff. And all the way at the bottom under Objects, we're going to check the box that says Show Dashboard Title, and it shows up at the top, and we're going to edit the title, and the title—just like on a sheet—it wants to take the name of the sheet, but we want to give it a separate title. The title is going to be Sales and Profit by State, and click OK. So now we're ready to add our visualizations. For this one, we're going to use Viz 1 and Viz 5. So I'm going to click and hold on Viz 1 and drag it and drop it onto the canvas, and then I want Viz 5 to be to the right of this one, but before we do that, we're not going to keep all of its filters. Let's click on the Profit filter, do its drop-down arrow, and remove the filter from the dashboard. And now we're ready to click and hold on Viz 5 and we're going to drag it onto the canvas. Now if I let it go right now, you see the gray shadings on the left; it will be to the left of the column chart. I'm going to drag it around; now it would be underneath the column chart. I'm going to drag it to the right side, so the shadings on the right, and I'm going to let go. Now that table—the Sales and Profit by State table—doesn't need to be in that wi—width of a pane. So on the left side of it—and it's selected; you can tell because you see the black selection tool at the top—I'm going to put my mouse on the left side, so it looks like a double-headed arrow, click and hold and drag to the right about that much, so your column chart gets more space and the table is appropriately wide. Now with the table, it came with a State/Province filter and a Year of Order Date filter, and we're going to
Remove both of its filters from the dashboard. Then we're going to select the sales and profit by state table again. And we want to get rid of its title, so I'm going to right-click on the title and hide it. What I'm going to do is I'm also going to hide the title on our column chart. We're going to set up the table to be used as a filter. So I'm going to go back and select the table, go to its dropdown on the right. When I go to the dropdown, I can choose "use as filter." Another way you can do the same thing is if I select the table, and I look at the there's an x button, which means remove it from the dashboard. The next button you can go to that sheet instead of having to navigate the sheet tabs yourself; it will take you to the sheet where that visualization resides. And the next one is "use as filter." The funnel here means "use as filter," so we're going to do it that way. And what that does here is let's click on California in the table, and it highlights the California data in the table, the sales and profit data, but it also updated this column chart; it's now only showing for the State of California. And then as I click on California in the table again, I get the full list back.
Let's format the background of our dashboard with our light gray shading. So I'm just going to go to the dashboard menu for this and go to format. Then I have my dashboard shading right at the top. For consistency's sake, and let's name the dashboard—actually, we should have named the dashboard itself, and then it would have carried over to its title—but we're going to use the same thing that we have in the title: Sales and Profit by State. Save your workbook before we create our second dashboard. I want to make some sizing changes to my canvas, so I'm going to just go over to size. I have all of this blank space to the right, so I want to use some more of that space. So I'm going to just adjust my width. And if you need to do the same with your sizing, go ahead and now I got rid of a lot of that blank space. And I'm going to select my table, and I'm going to make it so it's not quite as wide so that I have more space for the chart. So now that I've done, I'm going to go ahead and save my workbook again. And let's go ahead and create a new dashboard sheet. Go ahead and adjust your sizing, so I'm just repeating the width and the height that I used on the previous one. And for this one, we're going to be using Viz 2 and Viz 3 side by side. Go ahead and set that up, so we have our negative profit greater than 5,000 by region and subcategory on the left, and we have our sales by state map with profit values. We can get rid of the title; we can hide the title for our map. And we're going to edit the title for our negative profit, and we're going to just get rid of "by region and subcategory," so "Negative Profit Greater Than 5,000." And now I'll bring my map into view; I'm just going to reset it. What we want to do is because the map is by state, right, and this chart is by region, we want to add the states to the chart. And so, in order to do that, we can't do that here. We're going to select our negative profit greater than 5,000, and we're going to use the "go to sheet" icon to get back to that sheet. So now what we're going to do is we're going to go and drag the State field to the Rows shelf in between Region and Sum, so we can see for these two negative profits: one is from Texas, one is from Ohio. And now we can go back to our dashboard two page. Let's go ahead and name the page "Sales and Negative Profit by State." Let's show our dashboard title and do your light gray shading on the dashboard if you haven't already. And I just want to show you something: if you have a sheet on a dashboard, you can't delete that sheet. So so far, we've used Viz 1, 2, 3, and 5. I'm going to go to the—I'm going to right-click on my Viz 1 sheet tab and notice under rename you have hide instead of delete; that's because it's on a dashboard. Now, if I right-click on my Table Calculations Secondary Calculation sheet tab, that's not on a dashboard, so I get delete instead of hide under rename. Just wanted to point that out to you. Let's go ahead and save this file and bring up a new dashboard sheet.
Now let's go ahead and adjust our size for our canvas and go ahead and tell it to show the dashboard title and go to dashboard format and give it the light gray formatting—shading I should say—and I'm going to close format dashboard. So now I'm going to name the Dashboard 3 sheet tab to be "Top Sales by City," press Enter. And we're going to use Viz 4, so go ahead and drag it on. Our Top Sales by City map. Now we can hide the map's title; don't need it to be duplicated there. Now hover over any mark on the map, and you'll see what it shows in the tooltip. So what we're going to do now is we want to be able to go to our URL by using a dashboard action. So in order to do that, we're going to go up to the dashboard menu, and we're going to choose actions. And I'm going to go to—so it defaults to showing actions for this workbook—I'm going to go to this sheet, and then I'm going to add action underneath the grid and choose "go to URL." So it gives it a default name of "Hyperlink 1." We're going to name it "Learn it!" And then you'll notice under Source Sheets it has Viz 4 selected, the Top Sales by City dashboard with Viz 4 selected. And to the right of that, you have three different action—three different choices for running the action on. So the one we're going to use is menu, but let me tell you what they each mean: hover means if you hover over a mark on the map, it's automatically going to open the browser and go to the URL. If you choose select, that means that if you click on any of the marks on the map, it will automatically go open the browser window and go to the URL. I like menu because I would still have to click on the mark on the map, but in addition to everything in the tooltip at the bottom will be a link with the name that we're putting in here; it will be a link that I can click on, so it gives me more control before going to the URL, and that's why I like menu. Under URL Target, I'm going to select "new browser tab," and then I'm going to click in the—enter the URL box. If you look right under that box, you'll notice it already has the "https://"; all you have to do is type the rest of it in. In our case, we're going to type learnit.com, and it changed it to an HTTP, and we're going to click OK. And it shows in this grid now, and we're going to click OK again, and we're going to test it. So I'm going to click on any—any mark on the map, and now once I click on it, you see at the bottom of the tooltip it has the link for Learn It, and when I click on that, it opens up the browser window. And I just have to click anywhere else on the map to get all of my marks back. And let's go ahead and save the file again.
When you add an image to a dashboard page, like a logo or something, you can have it linked to a URL as well. And so we're going to do that now. Under Objects, go ahead and drag image, and I'm going to just—drop it over to like where the um filter pane is. We'll—we'll take care of where it's located in just a bit, but what I'm going to do is I'm to insert an image file, and I'm going to choose—now in your files from video description you have that Learn It logo—and I double-clicked it. And then I can tell it—or—not a URL to open when the image is clicked, so I'm going to type in my HTTP://learnit.com, and I'm going to click OK. So now what I want to do is I want to do the dropdown arrow to the left side of that image, and I want to choose floating. And then I'm going to move it by grabbing its move handle at the top, and I'm just moving it down into the lower right-hand corner of the map in a blank area, and I can click away from it. So because we attached it—otherwise, I mean if we didn't attach it to a URL, it would just be a logo image—but if you put your mouse pointer on the top of it, it looks like a hand, and you'll see the URL, and if you click it, it opens that page. So you have choices for a URL on a dashboard. So now what I'm going to have you do is pause the video and create another dashboard using whatever sheets that you want to use on it and making adjustments like getting rid of unnecessary filters, maybe using one of your visualizations as a filter. And then when you're done and you resume the video, you'll see the extra dashboard that I've created. All right, I hope you are satisfied with the dashboard you created. What's showing on the screen is mine, and to be honest with you, I actually created a new—another sheet, which is this one here, before I created my dashboard. So I have our key performance indicators on there, and then I have this new sheet that just shows the regions, the subcategories, and the sum of sales. On the bottom, I have this scatter plot chart that we created, and that would be our um parameters and calculated sheet because I wanted to have these parameters over here so that that chart can be updated by choosing different parameters. And then I have the legend over here for the KPI. Now what I've also done is made my new table interactive; I'm using it as a filter. So if I click on any option in there, it filters the other two visualizations. And I'll click on it to get rid of the filter. The other thing I added was the web page object. Now, when you add the web page object, you still have to use the dashboard action of a URL. So when you add the object, it asks you the URL of the object, so I gave it a Wikipedia State page that has information about US states. And then in my dashboard actions, I'll show you how I tied it to that. When I filled this out, I said menu again, and that's for the other ones. If I click on any point—any um mark—it will give me the menu on the tooltip, the link on the tooltip for that web page. And then the URL Target shows up as the web page object, and it has the URL down there. So I am going to click on Accessories under the East region in my table, and when I do that, it filters the other charts, but it also gives me the Wikipedia link. And when I click that, it just opens up here; it doesn't actually open a web page. So I have all the information about all the different states right in here, and I'm going to clear that filter. So this is a web page object; it actually shows the web page on your dashboard. Go ahead and save your file if you haven't already, and then we're ready to move on to creating our story.
Now we're ready to add our story sheet. So I'm going to go ahead and do that now. On a story sheet, on the left side at the bottom is where you'll find your size, so go ahead and make any width and height adjustments necessary. And then I'm going to go up—up to the story menu, and I'm going to choose format, and I'm going to choose our default light gray shading. Going to close the format story pane. So when it comes to a story, you have all of the sheets in your workbook as well as all of the dashboards in your workbook. Now you can use them individually or in groups as what are known as story points. So we have our first sheet here, and what we're going to do is we're going to drag our Sales and Profit by State dashboard onto the canvas. Now I could also drag another dashboard or another sheet for this story point, but since this one already has two visualizations that are somewhat related to each other, I'm going to leave them as their own story point and add a new one. So at the top of the story panel on the left, under "New Story Point," we're going to select blank. Notice now we have two captions up here; before we only had one. Now it's the same story, but it's just a new point, a new view. So for this one, I'm going to drag the Sales and Negative Profit onto the canvas. I'm going to go up and choose another blank story point, and Top Sales by City. Now if you'd like to add the dashboard that you created, go ahead and do another blank story point, like I'm going to do, and I name that dashboard "Regional Information," and I'm going to drag it on here. So I have four different story points in the same story. Let's name the story and tab—you can name the sheet tab—and we're going to call it "Sales Information Superstore," and go ahead and save your file. So I can navigate through the story by using these directional arrows surrounding the captions. So I'm going to just do the back arrow until I'm on the first view of my story. The first thing I'm going to do when I get here is make sure that the year of order date filter is set to all, and the subcategory is already set to all. So the first thing I'm going to do here is I am going to hover over the two tallest bars, so the first one is for Chairs, the subcategory, the second one is for Phones. So in the first caption, I'm going to type "Wow! We really increased sales of chairs and phones in 2022!" And now by clicking on the second caption, that navigates me to the second view in our story. So that's another way to navigate. And so I look at this—this is negative profit that's greater than 5,000 and sales—a negative profit by state. So what I'm going to say on this one is the caption is going to be "What can we do about increasing profit in Texas and Ohio?" Going to move to the third caption, and this one will be "These cities are topping us in sales; what are they doing that we can apply to the rest of the country?" And then last but not least, you're going to do a caption based on whatever your dashboard is conveying. And so for mine, I said, "We really need to ramp up so our KPIs are dramatically better." And I'm going to resize my story point so that they're—so I can see the whole thing. And you can make them wider if you want—want to as well. Go ahead and save your file. The other thing I'll say here is that I'm back on the first view in our story; you may have to scroll down or across in a story, and I don't really mind having to do this in a story; I really don't like doing it on dashboards, but sometimes on a story it is necessary. The other thing you can do with a story, and we don't have to do this, but you can duplicate a story point. And instead of doing a blank one like we did—now this has a layout tab as well. So if you want it to show the—if you don't want to show the arrows, you can get rid of them that way. That's one way of doing them, and we have caption boxes for the navigator. If you do the option button for numbers, you'll see the numbers of the views of your—your story. You can use dots, or you can have the arrows only. I prefer the captions because I can actually tell my story by using the captions, but sometimes I will just use arrows only; it just really depends. But I'd say 99.9% of the time I'm using the caption boxes. And I'm going to just go back to the Story tab, and congratulations. So I snuck one more dashboard in on you and one more visualization in on you, but good practice.
So in this extensive module, you learned how to tell a data story with dashboards. And so we had the opportunity to create more visualizations, which is good practice. And along the way, we learned how to apply a top-in filter and how to use map controls. We then created three dashboards using the visualizations in combination and individually. We learned how to use a visualization as a filter that will filter all other visualizations in the view. We saw that sheets cannot be deleted from the workbook when they are on a dashboard—only hidden—and we use the URL dashboard action to open a web page in a new browser window. And then learned how to add an image to a dashboard that can also function as a link to a web page. You had the opportunity to create another dashboard on your own, and I showed you the one I created as well. On mine, you learned about the web page object that can be added to a dashboard and how it connects to the URL dashboard action. We ended by adding a story with four story points and learned how to navigate the story view. Use—we added captions to our story for all four points and resized the captions. We learned how to change the story navigation options if necessary. Module 8 is adding value to analysis, trends, distributions, and forecasting, and we have a lesson for each of those. Let's go over some terms and definitions. When you add trend lines to a view, you can specify how you want them to look and behave, and there are five model types for trends in Tableau, which I'll get into momentarily. We did a distribution band earlier, but we have the definition here, so reference distributions at a gradient of shading to indicate the distribution of values along the axis. Distribution can be defined by percentages, percentiles, quantiles, or standard deviation. And in forecasting, in Tableau uses a technique known as exponential smoothing. Exponential smoothing models iteratively forecast future values of a regular time series of values from weighted averages of past values of the series. And lastly, we have the model types of trend lines. So you have linear, logarithmic, polynomial, power, and exponential. So just to make this simple, because again the PowerPoint is included in the files for video description so that you have it for future reference: a linear trend line usually shows that something is increasing or decreasing at a steady rate. A logarithmic trend line can use negative and/or positive values, and it's most useful when the rate of change in the data increases or decreases quickly and then levels out. Polynomial is used when data fluctuates; it's useful, for example, for analyzing gains and losses over a large data set. A power trend line is best used with data sets that compare measurements that increase at a specific rate; for example, is the acceleration of a race car at 1-second intervals. And then exponential is most useful when data values rise or fall at increasingly higher rates. So you have that for your future reference, and we'll be using um trend lines in this module. Let's navigate to our Discrete versus Continuous sheet tab. We're going to start by editing the title, so it says "Sales by Quantity." Then we're going to add a trend line to this line chart. Let's switch to the Analytics tab on the left, and we're going to click and hold on "Trend Line" under Model. And when we drag it on to our canvas, we'll see the five different types. I dropped it on linear. Let's right-click anywhere on our trend line, and we're going to go over the options on this menu, but I'm going to start at the bottom. So when you add a trend line, it defaults to show "Recalculated Line." Well, I'm going to click away from the menu, and a recalculated line will automatically show if you click on any marks on your viz. So I'm going to just click on this mark right here, and you can see the recalculated line as the original line—line is faded in the background. Now I can click away from it. Let's right-click on the trend line again, above.
Show recalculated line. Let's go to describe Trend model, and a dialogue box opens up. It's breaking down the calculations and the computations for this trend lines model. So it says, "A linear Trend model is computed for sum of sales given quantity," and it has a lot of different values in here. It's breaking down the model formula: quantity plus intercept. The number of modeled observations: 14. Number of filtered zero. It's giving you all the values here: sum squared error, mean squared error, r squared, standard error. And at the bottom, it continues for individual trend lines. So it's showing you the different coefficients there: the coefficient term, the value, the standard error, T value, P value.
Now, this is why I rely on software to calculate Trend models for me, because I'm not up to that level of calculation. This could also be copied, as you see in the bottom right corner. We're going to close that. Let's right-click on our line again, and this time at the top, we're going to go to describe trend line. So we already saw the trend model description, so let's take a look in here. So this is just giving you the equ--the P value, the equation, and the coefficient term, value, standard error--so a subset of what you see in the describe Trend model. This can also be copied. We're going to go ahead and close it. We're going to right-click again. Um, we don't need to edit all trend lines; we could. Um, let's go ahead and click on there just so you can see that. So we can change the model type. We can put in factors. Um, under options, we're seeing tool tips when we hover over the trend line, and if there are multiple colors on our visualization, we could add allow a trend line per color, and so on. And then we had to show recalculated line default before. Um, we don't need to see confidence bands in here. You saw bands earlier when we did a distribution, but we don't need to show those here, and we'll okay. And then right-click one more time, and we'll go to format. So if you want a different trend line type, line type, or a thicker line type, you can do all of that. You can also give it a color if you want it to. I'm going to make mine… the wider dash line… or the more… yeah, the wider dash line doesn't seem to want me to do that. Well, I guess I'm not… so I'm going to just get out of there. Go ahead and save your workbook.
And now we're going to use distributions. We're going to create a new visualization for this. So go ahead and bring up a new sheet, and you want to drag ship mode and ship date to columns. We're going to right-click on the year of ship date, hover over more, and select weekday. Then drag the orders count measure to the Rows shelf, and on the Marks card, we're going to change automatic to Bar. Let's edit the title, and it's going to be "Count of orders by ship mode per day of week," or "by day of week." And let's change our column bar colors. So along with our regular formatting here, we're going to make that dark green and go ahead and give the sheet our light gray shading. Let's name the sheet tab "Distribution band," and then get to your analytics pane on the left. Under custom, we're going to grab our distribution band, and we're going to do a distribution band for each pane. So drop it on pane. So each pane represents a ship mode. So it opens up the dialogue box, and where it says computation, we're going to do the dropdown. On the left side, it defaults to percentages, but this time we want to look at percentiles, so we're going to select percentiles. And then over on the right, it defaults to 95. We're going to do the dropdown, and we're going to select "Enter one or more values," so it allows us to put our values in that box. And we're going to type "25, 50, 75," and we can click away from that box, and you see that it added it to our values. So the label by default is comp--comp computation, sorry, and you can see where the 75th percentile is, 50, 25, so on and so forth. Now it's using a dark gray fill, which is fine. The tool tip will be automatic; you could do a custom one if you--if necessary, and we can click… oh, and you have a recalculated band as well in here for highlighted or selected data points, and we'll click okay. So now we see the distributions across the panes. All right. So for standard class, Monday looks like it's the one that reached up beyond the 75th percentile for the day of the week. Let's look at something. If I'm in the standard class pane and I hover over this distribution band, it tells me that the 50th percentile would equal 184. If I go into the second class pane and I hover, the 50th percentile equals 59. That's because it's calculating within each pane. And so we decide, okay, let's see what it looks like at the table label level. So I'm going to right-click on any of those bands and choose edit, and at the top, I'm going to change the scope to entire table, leave the same percentile values, and click okay. So now this is where it's putting the distribution bands, right, and it has the values. So if I hover down here, 25% equals 27.5 here; 75% is equaling 151. So it's level setting it for the entire table. Now, if you select a mark--I'll select this mark--so it's showing you this is how it does to recalculate it, right? It has that mark highlighted, and it's saying 75th percentile here. And if you click anywhere, then you'll get everything else the way it was. Let's edit it again and change the calculation. Let's do our value dropdown; we'll leave it on table and change it to percentages, and it's based on the count of orders, and we're going to change the percentage values that are in that box from 60 to 80. Let's try 25, 50, 75, and click away and click okay. Well, now look at how it changed the scale over here, right? So totally different numbers, and it looks like 25% of total is starting at 86.5. So we would have to change these distributions, or we'll just change it back to percentiles. So make that change back to percentiles, and that was 25, 50, and 75. Let's go back into edit, and with this box open, you can see the changes, just so you can see you can make choices about the way you like it to look. So I'm going to choose fill above, and notice how it fills all the way up to the top of the visualization, because these are check boxes; I can have multiples. So I'm going to also choose fill below, and I think that looks a little bit better. You also have symmetric and reverse checkboxes there, depending on what it is, the way you want it. So I'm going to just leave mine with fill above and fill below selected and click okay.
We've been very consistent with our formatting choices, using the dark gray--excuse me, the light gray background at the sheet level, but this might be an instance where you would want some color. So we're going to go in and format our distribution band, and where it says reference distribution, under that section, we're going to go to our fill dropdown, and I'm going to choose stoplight at the top. So for me, looking at this, it's more interesting, and it--and it gives me more insight because of the coloration; it makes it easier to read, so to speak. So, and it's still kind of in line; I mean, they're complimentary colors to our labels and and stuff like that, the dark green. So I think it works well on this type of a visualization. Let's go ahead and save the workbook. Before we get into forecasting, I want to take a few minutes and go over some slides with you. Um, the slides contain definitions, some forecast options, and forecast result options that you should know about before we start the next exercise. So forecasting is used to forecast future values over a Time series, and the model that's used in Tableau is exponential smoothing for forecasting. So that means that the models iteratively forecast future values of a regular time series of values from weighted averages of past values of the series. The exponential smoothing model gives more weight to more recent values versus older ones in your data set. You'll see two other terms: confidence interval and seasonality. For the confidence interval, the forecast model has determined with n% probability the estimated values of the measurement will fall within that area for that given period. So 90% probability, 95% probability. And then seasonality is the predictable variation in data over a period, for example, week, month, or quarter.
On this slide, we're talking about configuring forecast options. So the first option you'll eventually see is the for--forecast length, and that determine--determines how far into the future the forecast extends. The choices for forecast length are automatic, exactly, and until. When it's set to automatic, which is the default, Tableau will determine what the length is based on the data in the View. When it's set to exactly, it will extend the forecast for the specified number of units, for example, 5 years. And for until, it will extend the forecast to the specified point in the future. So those are your forecast length options. And then you have Source data options. Aggregate by specifies the temporal granularity of the time series. It defaults to automatic, where Tableau chooses the best granularity for estimation. This will typically match the temporal granularity of the viz, which is the date--diens the forecast is based on. It is sometimes possible and desirable to estimate at a fin granularity. If the time series in the viz is too short to allow estimation, then you have ignore last, and that specifies the number of periods at the end of the actual data that should be ignored in estimating the forecast model. I believe it defaults to the last one. Per period forecast data is used instead of actual data for these time periods. You use this feature to trim off unreliable or partial trailing periods, which could mislead the forecast. Then you have the option to fill in missing values with zeros. So if you are missing values in the measure you are attempting to forecast, you can specify that Tableau fill in these missing values with zero. The second part of configuring forecast options we're going to review is for the forecast model and forecast summary. For the forecast model, that determines how the forecast model is to be produced. Your choices there are automatic, where Tableau determines to what is to be the best of all models; automatic without seasonality, and it would be the best of those without seasonality as a consideration; and then you have a custom option, which is used to specify the trend and season characteristics for your model. The choices for Trend and season are none, additive, and multiplicative. When you select none for Trend, the model does not assess the data for Trend. When you select none for season, the model does not assess the data for seasonality. An additive model is one in which the combined effect of several independent factors is the sum of the isolated effects of each factor. You can assess the data in your view for additive Trend, additive seasonality, or both. And then you have multiplicative, and that's a model in which the combined effect of several independent factors is the product, not the sum. Additive is the sum; multiplicative is the product of the isolated effects of each factor. You can assess the data in your view for multiplicative Trend, multiplicative seasonality, or both. And then at the bottom of the forecast options dialogue, you have a forecast summary, which provides a description of the current forecast, and it will update whenever any of the forecast options are changed, and you'll see that as it happens.
Last but not least, before we get hands-on, this slide is showing forecast result options. So it defaults to actual and forecast; would show the actual data extended by forecasted data. Your other options are Trend; it will show the forecast value with the seasonal component moved. Precision will show the predictive interval distance from the forecast value for the configured confidence level. The Precision percent shows precision as a percentage of the forecast value. You have quality, which shows the quality of the forecast on a scale of zero, which would be the worst, to 100, which would be the best. The upper prediction interval shows the value above which the true future value will lie confidence level percent of the time, assuming that you're working with a high-quality model. The lower prediction interval shows 90, 95, or 99 confidence level below the forecast value. You have indicator, which show--which will show the string actual for rows that were already on the worksheet when forecasting was inactive, an estimate for rows that were added when forecasting was activated, and then you have none; do not show any forecast data for this measure. I just wanted you to have all of that in the background. Again, you can use this for future reference, but you will see these terms and things when we go hands-on in just a moment. Let's go ahead and create a new sheet for this and go ahead and name the sheet tab "Forecasting," and we're going to drag order date to columns and sales to rows. And then if you look up at the toolbar where it says standard, let's do the dropdown and select entire View. Let's make our line green--dark green. So I'm going to use color in the Marks card and make it dark green, and then let's go to the label box on the Marks card and check show Mark labels, and then go down to the font dropdown and make them bold. Now we're ready to add our forecast line. Now we could go to the analytics tab; um, we could go to the analysis menu, but what we're going to do is we're going to just right-click in our view and hover over forecast and choose show forecast. And if you look to the right, you have a forecast indicator, which is showing actual versus estimate. Now let's go up and right-click on the year of order date in the column shelf and let's make that a continuous field. If I hover over my forecast, it's letting me know that it's an estimate, right? It's giving me the year of the order date and the sales. So this is doing 2022, and then it's giving it to me for 2023. So it's only giving me two years of a forecast. We're going to change that. Now we're going to adjust some forecast options. So I'm going to just right-click on my forecast, hover over forecast, and choose forecast options. So here is where you have your forecast length. Next five quarters is what automatic chose. Let's do the option button for exactly and change it to five years. We want a five-year forecast. So you're noticing that the entire forecast area expanded. If you look down at the bottom of this forecast options dialogue, you'll see the forecast summary. So it's currently using Source data from January 1st, 2019, to July 1st, 2022, to create a forecast through September 30th, 2027. It's looking for potential seasonal patterns every four quarters, so every year it's looking for that season pattern; that's kind of how that is working. If you look at the source data, it's aggregating by--it's choosing automatic, and it's doing quarters, and you have the dropdown there where you could change it to another time period. If you wanted more granularity, you could do that. Going to leave it on quarter. By default, it's ignoring the last quarter before it started the forecast, so I'm going to change that--that to ignore the last two quarters. Maybe our last two quarters data is not really good at this point, or it could be incomplete, and you wouldn't want to include that in your forecast. I'm also going to tell it to fill in missing values with zeros, although I don't think we have any zero--zeros in our data. And then you get to your forecast model. So it says it's set to automatic; it automatically selects an exponential smoothing model for data that may have a trend and may have a seasonal pattern, and we could leave it like that, or we can do the dropdown next to automatic, and we can choose automatic without seasonality, or we can choose custom. And when you choose custom, that's where you get your Trend and season. Both of them are set to none, but you can set either or to additive or multiplicative. So I'm going to set my Trend to additive, and that means that it's adding things, and notice how my forecasts changed. And I'm going to set the season to additive, so both of them are additive, and it changes each time you make a change here. Underneath that, you'll see show predict--prediction intervals, and it defaults to 95%, and that's describing like your confidence interval. So the forecast model has determined with 95% probability the estimated values of the measurement will fall within that area for that given period. So 95%; you could kind of use the word accuracy at this point in time. And if you uncheck show prediction intervals, you'll see that that banding goes away. Check it again, and so this is your prediction; the shading around your forecast is your prediction interval. If I do the dropdown next to 95% and I choose 90%, it shrinks. If I go to 99%, it grows. We're going to put it back on 95% and go ahead and click okay. We're going to right-click on our forecast again, hover over forecast, and this time we're going to choose describe forecast. So you have two tabs at the top; we are on the summary tab, and it's letting you know the options used to create forecast. It's using the year of order date as its time series and the sum of sales as its measur--. The forecast forward 20 quarters, forecast based on dates, ignore the last two quarters, and the seasonal pattern is a four-quarter cycle. And then you have on the bottom, sum of sales, the initial, and it's showing--I like the calculation there--change from initial during this period, the seasonal effect, both the high and the low, and then you have your Trend and your season and your quality. Now, in the lower right-hand corner, you can say you can check show values as percentages, and so the values that were there are now showing as percentages. And I'm going to uncheck that, and let's go up to the Models tab, and you're seeing that we selected additive, right, for the trend and the season, and then these are your quality metrics and your smoothing coefficients, and both of these tabs can be copied to the clipboard in the lower right-hand corner. Let's go ahead and close. And now you'll see the forecast result options. So if you notice sum of sales, both in the Rows shelf and in the forecast indicator, they both have that diagonal pointing arrow on the right side that indicates that it's a forecast going on. So what we're going to do is we're going to right-click on sum of sales in the Rows shelf and we're going to hover over forecast result. So it defaults to actual and forecast, which is what you're seeing on your screen. If you select Trend, you'll see it displays more as a trend line, and if you hover, you can see the forecast indicator that it's an estimate, and it's showing the trend of sales, and if you look at your Rows shelf, it says now Trend of sum of sales. We're going to right-click again, hover over forecast result, and let's choose Precision. So Precision is showing the prediction interval distance from the forecast value for the configured confidence level, and I believe we have 95%, right? So it's showing the distance in intervals based on that confidence level, and we can right-click, and it updates up here to Precision of sum of sales. We can right-click again and feel free to look at the other forecast result options that are there. When you're done, go ahead and put it back on actual and forecast, and now we're going to edit the title to say "Five-year sales forecast" and click okay and go ahead and save your workbook.
In recapping module 8, adding value to analysis: Trends, distributions, and forecasting, we started this module with a definition of trend lines, distribution bands, and forecasts, and an overview of the five models of trend lines available in Tableau. We added a linear trend line to exist--to an existing visualization, learned how to show a recalculated trend line, and accessed the described Trend model feature. Then we learned how to describe the trend line, edit trend line options, and format it. We moved on to creating a new visualization and added distribution bands for each pane. We edited the distribution bands to tables scope and applied fill choices. We ended this lesson by formatting the distribution bands with complimentary colors for clarity. Before we begin forecasting on a viz, we reviewed forecasting definitions, forecast options, and forecast result options. We created a viz and added a forecast line before adjusting forecast options and seeing the forecast summary update based on the options we selected. We reviewed the described format information and tested a few forecast result options.
Thank you for viewing this Tableau introductory course. We're going to review, by way of conclusion, what we've covered in this extensive course. We did some minor formatting prior to module 6, but this is where we really focused on it. So we started with some formatting considerations and how formatting works in Tableau, and then we went and formatted our visualizations, which adds value to them. Although in module one we created a dashboard, in module 7 we actually focused more on the details of it. So you learned about dashboard objectives, and then we created a series of visualizations for dashboard and story use. We created a dashboard and added interactivity to it, and then we created a story and learned how to note our story points and how to navigate through the story. In module 8, we learned how to add value to analysis by using trend lines, distributions, and forecasting.
Welcome everyone. I'm Trish Connor, and this is Tableau Introduction. Tableau is a visual analytics platform that makes it easier for people to explore and manage data and faster to discover and share insights that can change businesses. It helps people and organizations be more data-driven. Tableau supports data prep, analysis, governance, collaboration, and more. This Tableau basic training course is designed as an introduction to Tableau for beginners. On completing the course, students will have a firm grasp of the basic techniques required to create visualizations and combine them in interactive dashboards. Specifically, students will meet the following learning outcomes, among others: Advanced Techniques, tips and tricks for Tableau. Thank you for viewing this Tableau introductory course.
Module 9 is about making data work for you. We have three lessons in this module, which kind of all run together. Um, the first one is structuring data for Tableau. The second one is dealing with data structure issues, and we're going to be using an Excel file from the video description called Vehicles_ddata_interpreter. And then the third lesson is an overview of advanced fixes for data problems. So this slide shows the recommended data structure for Tableau. Your data should be formatted like a table or spreadsheet. You would want to ensure that the data types are correct when you have the opportunity to do so and it makes sense. You should split fields into multiple fields. Um, we've done that before with the customer name field in Sample Superstore; we split it to customer last and customer first. And then Tableau will present the data interpreter when the source is Excel, text, CSV, PDF, or Google Sheets. The data interpreter tool in Tableau can interpret and potentially fix data structure issues. And lastly, some ideas for fixing data problems would be renaming fields, which we've also done, grouping, aliases, and identifying and fixing geographic errors. For example, we've created visualizations, and that's because the fields we used had been assigned a geographic role. If you bring data into Tableau and it's not assigned, for some reason, a geographic role, you need to fix that if you plan to use those fields on maps.
I'm going to start this in the Excel file that we're going to be using in Tableau, Vehicles_ddata_interpreter. Um, feel free to open it if you like, or you can just watch on my screen. Um, there are several problems with this data; there are blank columns and blank rows. I wouldn't particularly structure data that way. Um, in Excel, I know that some people like to have a blank column and minimize its width so it's kind of like a dividing line to separate different groups of data, but when you're trying to do data analysis and visualizations, that kind of data can be problematic. The other thing that's happening in here is we have blank rows, and then if you look in column F, the classification column, we have cars, van, minivan. If you look down here, here's a data entry issue: instead of typing car, there's just the letter C; instead of typing van, minivan is VM; and then there's a v+m down here and also an auto instead of car. So there's several problems there. The other issue is there's a subset of data on another sheet. So if I go to the pricing sheet tab, it has the same rows missing, but this one has the VIN number, dealer cost, and manufacturer suggested retail price. I'm going to go back to the inventory tab. That data could be—I mean, it should be—related to each other; it has a common field of VIN number. So now I'm going to go ahead and close this file and switch over to Tableau.
When you get to Tableau, let's go to the File tab and close Sample Superstore live. If it prompts you to save changes, go ahead and do so. And under Connect to a file, we're going to choose Microsoft Excel and navigate to that Vehicles_ddata_interpreter file that we just looked at, and I'm going to just double-click it. So this is an Excel file, one of the ones that it is able to provide the data interpreter Tableau feature to, and so on the left side, on the data source screen, it says Use data interpreter, and it says Data interpreter might be able to clean your Microsoft Excel workbook, and we're going to see how that process works. Let's go ahead and check the box in front of Use data interpreter to enable it, and it's already done. We can click on the Review the results link to see what it has fixed in that Excel file, and it will open an annotated copy of the file. You notice up here it's changed the name somewhat, and this can be saved. It adds a tab in the first position, and it's the legend; it's the key for data interpreter. So it gives you the key for understanding the results, and it's color-coded over here; it has borders around it, and then we also have the two sheet tabs that were in our original broken data file. So let's go to inventory. And so when you're looking at the key, you see that it interprets the data as column headers or field names, and then green is data is interpreted as values in your data source. So that's what it's saying there. So it's letting you know that this color is header and these rows are data. Now we'll notice that it didn't really get rid of our blank columns and blank rows on this, but it did make sure that it knows what the headers are. And then if we look at the pricing tab—now I'm going to adjust this column width here so I can see the values—it did the same thing. So simply put, it recognized the headers and the data. Now go back to inventory. The data interpreter did not fix the issues in the classification column, but those are easy enough to fix in Tableau. So we have car, auto, C—for all that should be car—and we can go ahead and close this file. If you want to save your changes, you can. I'm going to choose to not save them. And if you ever want to undo the changes that data interpreter may have made, you could simply just uncheck the box. And by the way, when data interpreter cleans the data, it doesn't impact the source file; that's why it creates that annotated Excel file. So we're going to go ahead and see what we need to do to fix the data. Let's drag inventory onto the canvas, and then we'll drag pricing onto the canvas. So it detects a relationship between the two because they have a common field, which is VIN, and then you can see that now. So it's just letting you know that those two tables are related to each other based on the common field, but relating the tables doesn't merge the tables. So right now, if you click on the inventory table, you'll see the fields in the inventory table: then year, make, model, classification, color. If you scroll down through the data, you'll notice that even though it didn't appear like it in the data interpreter result file, it did get rid of blank rows and blank columns, so we don't have to worry about that at all. So we want a merged data set. So I'm going to double-click inventory in the canvas so that I get to the physical layer, and I'm going to go ahead and drag pricing into the view, and so it automatically creates that inner join, and it's using the VIN field as the common field. So now when I look down here, I see the merged data set, and there's no need to have the VIN number in there twice. So we're going to right-click on the VIN pricing header, and we're going to choose Hide. Let's go ahead and navigate back to our logical layer.
So now we are going to address the issues that we're having in our classification column where we have car and van/minivan input different ways. So we're going to fix that now by creating a group. So we're going to right-click on the classification heading, and we're going to choose Create group. So it's showing all of the different classifications, including the ones that are mistakes. So we're going to control-click—well, we're going to click on C and then car, holding down the control key, and also Auto. So those three, and we're going to click at the bottom on Group, and we're going to name the group Car. And we have to do the same thing with v+m, van, minivan, and VM, and we want to name the group Van/Minivan. So I accidentally, on purpose, did not include VM in my van/minivan group. So all I would need to do is click on it, and up here in the upper right corner, I can click on Add to, and when I do the drop-down, I see the groups that I created, and I'm going to select Van/Minivan, and so it includes it in that group. And notice groups are represented by paper clips. So the other thing is we have a Car group, a Van/Minivan group, and then we have SUV and truck by themselves, ungrouped. If we wanted to include an Other group, if I check this, then we have an Other group that includes any members that were not previously grouped. We don't want an Other group, and we're going to go ahead and click OK. So notice we have the original classification field that still contains C, car, auto as separate things, and the same for our van and minivan, but if you look at the right side of your grid, you'll see that it has Classification Group, and this is where the corrected data is. So I didn't mention it when we were in the Excel file, but we have a similar problem in the Model field. So let's right-click on Model and select Create group, and I'll show it to you in the list. So the actual model name is 88, and in here it's been put in two other ways: 99 and 77. So we need those three entries in a group, and we want the group name to be 88. Go ahead and set up that group, and once you're done, your screen should look like mine, and we'll go ahead and click OK. And so all the way to the far right, we'll see our Model Group, and we don't have any 77s or 99s showing. If we look at the Color field, we realize that the color Blue should really be Dark Blue, and the color Green should really be Forest Green. So we're going to adjust that by using aliases. I'm going to right-click on Color and choose Aliases, and in here I can actually change the alias in the Value Alias column. So I'm going to click on Blue and I'm going to just type Dark Blue and press Enter, and I'm going to click on Green and type Forest Green. The other colors are fine, and then I'm going to click OK. So you notice here in the Color, you'll see the aliases, and that's what would show on visualizations as opposed to what it was originally. Let's go ahead and save this file. We'll call it Vehicle Information, and let's go to Sheet 1 so that we'll be able to see our work. So you'll notice over on your data pane you have Classification and Classification Group; you also have Model and Model Group; you don't have a group for Color because it made those alias changes within the field. Let's drag Classification Group to Rows, and for comparison, let's drag Classification to Columns. So you see the columns still have the bad information in there, and we can get rid of Classification from the column shelf. Let's drag Model Group to Columns, and you see that we—if you scroll across—you'll see that we don't have a 7, 9, 7 or a 99 because we grouped that with 88, and you can get rid of Model Group. And lastly, let's drag Color to Columns, and you'll see our Dark Blue and Forest Green there. So just to round this out, let's go ahead and drag MSRP measure to—to Detail, or actually, I'm sorry—to Text on the Marks card. So we're seeing the MSRP, to sum of the MSRPs by classification and color, and you can—we don't need the field labels for columns here, so I'm going to get rid of—excuse me—the field labels for rows; we don't need it to say Classification Group, and we really don't need it for the columns either; we don't need it to say Color. And if you want to spend a few moments adding more information and creating a visualization out of this data, go ahead and do so, and then you're going to save and close the workbook.
And so this is my end result for adding more fields and doing some formatting on this sheet. In this module, you learned some techniques on how to make data work for you. We started by viewing an Excel file that contained some data entry and structural errors. We connected to that file in Tableau and learned how to use the data interpreter, which can sometimes fix structural issues in Excel, text, CSV, PDF, and Google Sheets files. Data interpreter presents itself on the left pane in data source view once you connect to the data source. We used the feature and reviewed the results in the annotated Excel file it created. The original source data file is never impacted by any data interpretation—interpreter changes, pardon me. We saw that data interpreter was unable to fix our data entry issues; we had blank rows, blank columns. Sometimes it will fix those visually, and you'll see it in the annotated file, and other times it won't, like in our case. However, it didn't bring in any blank columns or blank rows into our data set. We then created a relationship between both tables and created a join between them to merge the data from both sheets. We created groups on two fields to fix incorrect data and modified aliases to display on visualizations, and you had an opportunity there to create a group on your own. We built a visualization to show our corrections, and you had the chance to add more to the visualization and format it on your own. We'd already split fields, renamed fields, and learned how to change geographic roles if necessary earlier in the course, so we did not cover that in this module, although those concepts are also part of making data work for you.
In module 10, we'll get into Advanced Techniques, tips and tricks. The first lesson we're going to learn about sheet swapping and how they can make your dashboards more dynamic. The second lesson you'll learn how to answer complex questions by leveraging sets. The third lesson is going to be using background images. Now we're going to be doing those first three lessons using our Sample Superstore live workbook, and then for the fourth lesson, mapping techniques, we're going to use a different data source. It's in the video description; there's an Excel file called Australian_ghost_sightings. So what is sheet swapping and why would you do it? It enables a user to view visualizations individually on dashboards. Imagine having multiple visualizations on a dashboard, and a user is accessing it from a mobile device. Sheet swapping is extremely helpful in that situation as well as others, and it is a way to make your dashboards dynamic. And then we talked about leveraging sets. So what are sets and what does it mean to leverage them? You can use sets to compare and ask questions about a subset of data. Sets are custom fields that define a subset of data based on some conditions. You control the level of detail you view. You can make sets more dynamic and interactive by using them in set actions. Set actions let your audience interact directly with a viz or dashboard to control aspects of their analysis. When someone selects marks in the view, set actions can change the values in a set. In addition to a set action, you can also allow users to change the membership of a set by using a filter-like interface known as a set control, which makes it easy for you to designate inputs into calculations that drive interactive analysis.
I'm back in Sample Superstore live, and we're going to get set up for sheet swapping, and we're going to do that by creating two new worksheets. For the first one, we're going to drag Subcategory to Rows, Regions to Columns, and Sales to Text. We are going to hide the title, and let's name that sheet Cross Tab. So I've gone ahead and shaded the sheet and widened the Subcategory column, and I'm going to hide the field labels for columns. So this is going to be one of two visualizations that can be swapped in a dashboard. Let's go ahead and create another new sheet, and this—on this one—let's go ahead and hide the title. This time we're going to do it a little bit different. In your data pane on the left, click on Order Date, and then hold down your control key and click on the Profit measure, and then in the upper right-hand corner, click on Show Me, and we're going to select Line. I'm going to collapse Show Me, and then I'm going to right-click in the Columns shelf on Year of Order Date, and I want to select the Month. We're going to name the sheet Line, and then go ahead and do your usual formatting. I'm going to change the color of the line to that dark green, and I'm going to give it a worksheet shading. The other thing I realized is I want the actual month to show, um, so I'm going to right-click on the Month in Columns, and I'm going to choose this Month on the list, so it actually shows the months. Let's go ahead and save the file. Now let's go back to our Cross Tab sheet, and here we need to create a parameter and a calculated field that we're going to be using in our sheet swap. So I'm going to go to the drop-down at the top of the Data Pane, and we'll create the parameter first, and we're going to name the parameter Sheet Swap. We're going to give it a data type of String, and under Allowable values, we're going to select List. We're going to add our two sheets that we're going to use for sheet swapping. So where it says Click to add, we're going to type Cross Tab, press Tab so you get your display ads, and then Click to add again and type Line and Tab, and we'll click OK at the bottom. Now we're going to create our calculated field from the same drop-down, and we're also going to name it Sheet Swap, and we're going to just reference our Sheet Swap parameter. So if you start typing it, you can select it from the list; it lets you know the calculation is valid, and we'll click OK. What it does—you'll see this if we—we right-click on that calculated field, Sheet Swap, and we go to Edit, you'll notice that it prefaced with parameters, and we can click OK to get out of there. Now we're going to drag the calculated field to the Filters box, and just for consistency sake, at the top we're going to select Custom Value List, click where it says Enter text, and type Cross Tab. Now if you press Enter, it's going to say it—you might get a strange result—you're going to click the plus sign to the right of that to add, or you could do Control-Enter, and we're going to click OK. So we just told this filter to filter for the Cross Tab sheet. And now what we can do is right-click on your parameter, Sheet Swap, and choose Show Parameter, and notice it's defaulting to Cross Tab there. Now let's go to our Line sheet, and on the Line sheet, you're going to drag the Sheet Swap calculated field to Filters, Custom Value List, Enter text, and it's Line, and you can do the plus sign or Control-Enter, and then click OK. And now if you show the parameter on this sheet—now you notice the parameter comes up saying Cross Tab, and that's why you're not seeing the Line. If you go to the Cross Tab sheet, you'll see the Cross Tab. Go back to your Line sheet, do the drop-down, and switch it to Line. So when you're seeing—you can see one or the other is the way it's set up right now. Now we're ready to pull this all together in a new dashboard. I'm going to adjust my size because I'm doing this video; I'm going to leave it on desktop browser; um, if it was a phone…
Device. You get a different layout here, and you would adjust accordingly. Um, sheet swapping is very good for mobile access, but it's also good in general if someone is using the dashboard and they want to be able to focus on whatever sheet one at a time. Now you can. The steps that we went through for applying the calculated field as a filter on each sheet—well, maybe you want five different visualizations on your dashboard; you would do those same steps and show the parameter so that you can see that it's working on all the other sheets. We're just using the two sheets, Cross Tab and Line, so I'm going to adjust my sizing here first. So I adjusted the size of my canvas. No, I think that is too wide; I got a scroll bar. All right. And then I'm going to drag Cross Tab into the canvas, and notice we're not seeing the visualization because the parameter is showing Line. Let's just change that to Cross Tab for right now, and then we're going to drag Line underneath Cross Tab on the canvas. And because it's saying Cross Tab, you're just not seeing the Line, so that's working as the way we want it to work. Select your Cross Tab, and on the toolbar where it says Standard, choose Entire View. Switch back—swap, I should say—back to Line, and you'll see that that is also adjusted for the Entire View. Going to leave it on Cross Tab for right now. Let's hide both titles; don't need those there. And then you're going to select your Cross Tab; make sure you have the actual object selected, and on the right-hand side, we're going to go to its dropdown, and we're going to choose Floating, and then we're going to resize it to fit the entire canvas, except that we don't want to cover up our parameter filter over there. And then if you test out your sheet swap, Line will fill the entire canvas as well. Go back to Cross Tab on your sheet swap, and on that sheet swap parameter, we're going to do the drop-down arrow, and notice it's a compact list; we want to make it a single value list, so it has option buttons. So at this point, I can switch to Line; I can switch back to Cross Tab, and they're both filling the entire canvas when they're displayed. Go ahead and name your dashboard Sheet Swap, why not, and then save your workbook.
Let's create a new worksheet so that we can create a set, and you'll see how what a set does. So just as a reminder, sets allow you to compare subsets of data. We are going to create a set based off of the Customer Last Name field, and so let's right-click on Customer Last, hover over Create, and choose Set. And we're basing it on the customers with the top 20 sales. So I'm going to name this set Customers with Top 20 Sales, and then I'm going to click the Top tab; I'm going to select By Field, change the 10 to a 20, and change the Category field to the Sales field, and we'll click Okay. Great. So we have our set. Notice the interlocking circles on the left side of it; looks like the in—kind of looks like a a relationship or a join type—and it's Customers with Top 20 Sales. Now we're going—going to create a hierarchy, and we're going to create the hierarchy with the Customer Last and the Market Segment fields in it. So we already have two hierarchies in our data set that just came in this way: Location is the name of a hierarchy, and it has Country, Region, State, Province, Region, City, and Postal Code within it, and we can collapse hierarchies and expand them when needed. And then we also have a Product hierarchy with Category, Subcategory, Manufacturer, and Product Name. So what we're going to do is we're going to select Customer Last, hold down your Control key, and select Market Segment, and right-click on either of the selected ones, and at the bottom, we're going to hover over Hierarchy and select Create Hierarchy, and we're going to name it Customer and Segment and click Okay. So now we have our Customer and Segment hierarchy, which includes Customer Last and Market Segment, but we also want to add our set to that hierarchy, and we want our set at the top of it. There's a couple of ways we can do this. What I'm going to do is I'm going to click and hold on my Customers with Top 20 Sales set; I can drag it and drop it, and you have that little guideline, so I'm going to put it above Customer Last and drop it there. So now we'll see how we can compare the subsets of data and also get more detail or not when we're using sets. So the first thing that we're going to do here is we—we are going to drag our Top 20 Customers by Sales set to the Filters box, and we're going to right-click on it, and we're going to choose Show in—Show of Set. On the filter screen, we're going to select All, and we're going to click Okay. Now we're going to drag our customer in from our hierarchy—our Customers with Top 20 Sales; we want that in Rows—and notice it says In and Out, and you have an In row and an Out row. Now let's drag Sales to Columns. So what you're seeing here: the In row is all of the top 20 customers based on their sales values, and the Out row are all the other customers, so you're able to compare those two subsets of data in this way. Now the other thing I like to do is I'm going to grab my Top 20 Customers by Sales and drop it on the Color box on the Marks card, and it automatically gives it a blue color for in—those members that are in the set—and a gray color for those that are out. I'm going to click on Color in the Marks card, choose Edit Colors, and I'm going to keep it on the automatic palette on the left side. I'm going to click In—I'm going to click on In—and I want that to be green, and I want Out to be red, and then I'm going to click Okay, and it gives you the legend over here, so that updates, of course, with our color choices. Now how can I get more detail on this? If I look at the Rows, I have the plus sign in front of In/Out, right? I'm going to click the plus sign, and because that was in the hierarchy, it's now showing the Customer Last Name as well. If I click the plus sign on the Customer Last Name, it will show the Market Segment, which is the next one that's in the hierarchy. I can get rid of that; I can—and do the minus sign in front of Customer Last to get rid of Market Segment, and the minus sign in front of In/Out to get rid of the Customer Last. So that gives you better comparisons when you add more detail by drilling down. Let's go ahead and change—let's edit the title on this one, and it's going to be Comparing Customers with Top 20 Sales to All Other Customers, and then for the sheet name, we'll call it Leveraging Sets and save your file.
So on this one, we're going to do a couple of little tweaks to it, and then we'll see how to drill down on it. We're not going to apply a set action to this visualization, but we're going to create another one in which we will do that. So for right now, I want to hide this Row field label, so I'm going to just right-click on it and choose Hide Field Labels for Rows. Um, if you ever hide field labels for rows or columns, let me show you how you can get them back. You can go to the Analysis menu, hover over Table Layout, and you'll see whatever is hidden will be available in the list, so I can click on Show Field Labels for Rows to get it back, and I'm going to hide it again. The next thing we want is we want this filter to show, so I'm going to right-click on the filter, and I'm going to just say Show Filter, and when it comes up, I'm going to go over to the right and access its dropdown and make it a multiple values dropdown. So now if I hover over the In and Out, I'll see the plus sign, and because this is at the top level of our hierarchy, if I drill down, it's then going to show the Customer Last Name, and then if I drill down on that, it will show the Market Segment. So let's test it out. We're going to do the plus sign, and we got the last names for both In and Out, and if I go over to the Last Name column and do the plus sign, then I see the Market Segment, and notice those get added up here to the Rows shelf. Now to collapse it again, I can go up to the Rows shelf and do the minus sign in front of Customer Last, and that collapses Market Segment, and if I do the minus sign in front of In/Out, it will collapse the Customer Last Name, or I could have used the minus signs that were on top of those categories. Let's go ahead and save one more time and create a new sheet.
We're going to start by naming this the sheet Asymmetric Drill Down, and of course, it drops it into the title for us. On this one, we're going to create a set from the Category field, and we can leave the name as Category Set, and for this one, we're going to just choose any category off the list as a member; it's just a temporary placeholder. When we apply to set action, this is going to get overwritten, so we can just do Okay on that. So we have our Category Set in our Data pane. Before we continue, let me show you why we're doing this and what the set action will do. Let's just go back to Leveraging Sets for a moment, and let's go ahead and drill down, and you notice when you drill down, it drills down for the entire thing, and we can collapse that. What we want to happen is when we drill down, if we click on a mark, we only want it to drill down for that mark, not for everything else. So that's our end result, and that's going to happen via a set action. So let me collapse this stuff and go back to our Asymmetric Drill Down. We already have our Category Set created, so now we're going to create a calculated field. I'm going to use the dropdown at the top of the Data Pane and create calculated field, and we're going to call it Asymmetric Subcategory, and then I'll get the calculation in, and you'll be able to copy it from my screen. So it's an if-then-else construct; it's saying if it's in the Category Set, then show the Subcategory, or else just keep it on the Category. So when we populate that Category Set, if the user clicks a a heading or a mark and it's part of that Category Set, then it will drill down to Subcategory just for that one, or else it's just going to show the Category. Let's go ahead and click Okay. So we have our calculated field in our Data pane. We're going to drag the Category field to Rows, and then our Asymmetric Subcategory is also going to Rows, and then we're going to drag Sales to Text on the Marks card. So right now, if I expand Category, it's going to do it for the entire cross-tab table. I'm going to collapse it again, and now we can do a set action. Now you can do a set action from the worksheet level, and if you put the worksheet on a dashboard and you realize you didn't do a set action on it, you can do it at the dashboard level as well. So let's do this from the worksheet level. We're going to go up to the Worksheet menu, and we're going to click on Actions. We're seeing this would be the same as if we were in a dashboard—this Actions box—and I'm going to select the This Sheet option button, just so I'm not looking at everything else that's in the workbook, and I'm going to choose Add Action, and the action is going to be Change Set Values. So these are just the same as when we saw dashboard actions—Change Set Values. We're going to name the action Asymmetric Drill Down; the name is our—the same as our sheet—and notice we have the Source Sheet; it's set to Select. So if they actually click on a mark, and then we're going to go down to where it says Target Set; we're going to hover over Sample Superstore, and we're going to choose Category Set. Running the action will assign values to the set; clearing the selection will—we want it to remove all values from the set, so we're going to click Okay at the bottom of that, and you see our set action right here, and we're going to click Okay. Now we are going to test our work—work. So if I click on Furniture under Category, it just expands that category to show its subcategories. If I click in a blank area outside of the Cross Tab, it will collapse everything. If I click on Office Supplies under Category, they're expanded. If I click on Technology under Category, it's expanded. So this is a pretty cool feature—um, using sets, calculated fields to create an asymmetrical dropdown situation, so it doesn't drop—it doesn't show everything, just the category of focus. So before we put this on a dashboard, um, let's go back up to Worksheet, and we're going to go back to Actions, and when we look at our action in the list, it says the Source is This Sheet. Now this will become a problem when we put it on the dashboard, so this—um, I thought that there was a Tableau blog that said this was fixed as of Tableau 2020, but it's still not working, so this is the workaround. If we were to put this sheet on the dashboard, it's not going to work; the drill down is not going to work as expected. So what we need to do before we do that is we're going to select it in this list, and we're going to edit it, and all we have to do is change the source sheets. So it's a little bit of a pain; again, it may work perfectly on your system, but I do have the latest version of Tableau, and it's still not working, so I'm going to do the Source Sheet dropdown, and I literally am going to select Sample Superstore, and then all of the sheets are selected. So what I have to do is I have to deselect everything—thing except Asymmetric Drill Down. But we have to tell it the source is Sample Superstore; it's a weird workaround; otherwise, you would have to recreate it on dashboard actions, which is like having to do it twice. This way, it will work on both the sheet and the dashboard. So I'm going to just finish unclicking, so now the only thing that's drop—that's checked in the dropdown is the Asymmetric Drill Down sheet, and I'm going to click Okay and click Okay. Now we can go ahead and create a dashboard and drag our Asymmetric Drill Down onto it, and now test it, and everything should work as it did on the sheet. And if I click on Furniture, it expands it; click away; click on Office Supplies, same thing; click away. So if you hadn't done that, it would have expanded everything on here like it normally does before we went through that process. And again, I apologize for that; it is a pain, but if you want to use it on a sheet and a dashboard, you need to take that step where we just fixed it to Sample—Sample Superstore data source. If you're just using it on a sheet, you don't—you can just use the sheet; that's kind of how that works right now. So let's go ahead and name this dashboard; I just wanted to show you it on a dashboard, and we'll—we'll name it um Sales by Category with Drill Down and save your file again.
Since we're here, um, I'm going to—I'm not going to make this any wider than it is, but what I'd like to do is have it fit the entire view. See how that looks? Kind of don't like how that looks, so I'm going to go back to Standard for a moment, and you can go ahead and hide the field labels for Rows, and I chose to fit the width instead of the Entire View, and let's add our table calculation. I think it'll be the second one in your list; if you hover over it, it should say Table Calculation, Secondary Calculation, and I'm going to drag that onto the bottom half—math—and if necessary, I'm going to fit the width on that one as well, just to have a a different visualization that has—you know—well, actually, that's not the visualization, so this is cool. Let's get rid of that second one on the bottom; you can use the X in the upper right-hand corner. I grabbed the wrong one; you find the way one I'm talking about. So it's the first Table Calculation one; when you hover over it, it says Running Totals in Entire Table, and let's drag that onto the bottom, and for that one, I'm going to fit it to the width as well, so they both have the categories in it; that's why I put both of these on here at the same time; they kind of relate to each other. And I'm going to right-click on the bottom one on Category and hide the field labels for Columns. You know, you can do your thing up here with expanding and seeing the Subcategory if you need to and then clicking away from it to collapse everything. So I just want to show you in here—um, let's just go to our Asymmetric Drill Down sheet and then go up to the Map menu, and you see you have Background Images there. We're going to add a background image, but we're going to do it at the—the dashboard level. So let's go back to our Sales by Category with Drill Down dashboard. If you go to the Map menu when you're in a dashboard view, Background Images is dimmed out, and that's because you add the image from the object. And I think we did this earlier; we added the Learn It logo, and we're going to use the same one again, but just to fill up some of the space in here. So I'm going to drag that image object onto the dashboard and put it in between the two cross-tabs, and I'm going to click on Choose; it's already on Insert Image File; I'm going to choose, and then I'm going to use that Learn It logo, and then I'm going to choose the options to fit the image and center the image, and I'm not going to attach it to a URL at this point; you could, and we did that earlier where we had it go to um learnit.com when clicked on, and we're going to just choose Apply and click Okay. So we have our image there, and I'm going to just resize it so it's kind of taking up—now this one is not really a good one to resize, but you get the gist; the aspect ratio is not locked, so it's getting distorted, but you would want to use images that make sense to your data if you're going to be putting them on a dashboard. There's nothing wrong with having the company logo on there, although I wouldn't do it that large, but I think you get the gist, and you know the process for doing this. Let's go ahead and save the file, and now we're going to go to File, Close, and we're going to connect to another Excel file, and that's the Australian Ghost Sightings. So this has a lot of geographic information in it, and the appropriate Geographic roles are already assigned, right? Postcode is assigned—Zip Code, SL Postcode, so on and so forth; the latitude and longitude were generated here. Go ahead to Sheet One. On Sheet One, we're going to drag the Longitude to Columns, and it's giving me Average, but we'll fix that, and we're going to drag—drag the Latitude to Rows, and right-click on your Longitude and turn it into a dimension, and do the same with the Latitude, and so we have this map of Australia with all of these different marks on them, right? So if you hover over any mark, it's just showing you the latter—attitude and longitude right now. We're going to add the Postcode to Detail in the Marks card, and now when you hover, you see the Postcode as well. What we want to do next is we want to create groups out of regions, and the regions are not like a field in our data source; we don't have a Region dimension in our data source, so this is going to be kind of fun. But the first thing that we're going to do is we're going to add a border and a halo to the marks so we can—so each
Mark will stand out a little bit more now. A Halo is like an extra border. So what we're going to do is we're going to go to the color box on the marks card, and under effects, we're going to go to the Border drop down, and we're going to choose a black border. And then we're going to go to the Halo dropdown and choose like a red halo, and that makes them kind of stand out a little bit more.
So now we're going to create the first of seven groups directly on the map. What I'm going to do is I'm going to use a drawing tool, and I'm going to show you what the first group will look like. So this is a representation of what you're going to use the lasso tool to draw for the first group. Now don't worry about being exact; we just, you know, you're just learning how to do this probably, so and it takes some practice. And so what I'm going to do is I'm going to go to my map tools and switch to the lasso tool, and I am going to click right about here and start drawing the lasso. So I want to go underneath, and then I want to grab everything else like that, and the end has to meet the beginning, and when it does, you'll see it'll pop up with keep only, exclude. There's a paper clip; you're going to go to the paper clip drop down, and for the first group that you create, you're going to choose all dimensions.
So now you have a legend, right, and everything that's not in the group is called other. So what we're going to do on the legend, we're going to select that blue color, and we're going to choose, on the popup, we're going to choose exclude. And so the reason why we did that is so that when we're selecting our next group, we don't include members of the first group group when you do the second group, which I'm going to draw for you on the screen in a moment. When you do the paper clip, you're just going to click on it, and it means group; you don't have to do that all Dimensions again. So let me pan, and I'll draw out where the second group is going to be as best as I can, and then what the second group is going to look something like this. Let me just take another look and make sure, yeah, put all of those in there, and then I'm going to just come down and grab everything else at the bot—oops, I kind of mess that up, but you get the gist. Let me just double check that. I just want to make sure I'm as accurate as possible here. Just want to check the right side of that drawing and make sure I got what I needed in there. Absolutely. And so go ahead and use your lasso tool, and again we're not going for exactness here.
So now you can see the members that I included in the second group, and what I'm going to do is I am going to hover over one of the members. When I see keep only and exclude, I'm going to just click on the paper group, the paper clip, and it groups them. So now on the legend, I'm going to select that blue colored group, right-click on it or, and I can choose exclude. And now I'll map out the third group for you, and there is my absolutely horrible drawing of the third group. So go ahead and use your lasso tool to get that group going, and you can see the marks that I have in that group. So now I just need to hover and group them, and now it automatically excluded them; it picks up a pattern, so that's what's cool about this. Okay, I'm going to draw the fourth group for you, so that is what we're aiming for for the fourth group. Go ahead and do your best, and you can see the ones that I selected, and I'm going to group them; automatically excluded, it's a beautiful thing. Okay, group five coming up, so there's your next group roughly. Go ahead and grab it. There is your next group roughly; go ahead and lasso it. And for the final group, you're you're going to just grab what's left and group it.
Now at this point, my map is empty, except I forgot three marks at the top. In order for us to, since we've been hiding our groups, we're going to bring them back, and the way to do that is by getting rid of latitude on the filter shelf. So now all of our groups are back, and I see I have this other group which should have been within another group. I'm not going to mess with it right now, so we have all of our groups back. Well done! I know that takes a little bit of practice to get used to. If you don't do it often, it feels like you have to, you're learning it all the time over again. So for our purposes, this is good, and go ahead and name your sheet Australian ghost sighting. Let's drag the ghost sightings measure to size on the marks card, and then go to size and increase the size, so you're seeing the ghost sightings in all of the groups. Now we're going to go over to the legend; we're going to go to it drop down and choose highlight selected items. And now we're going to modify each individual Legend Mark. So going to right-click on the first Mark and choose edit Alias, and for this one we're going to name it Northern, and now it dropped to the Bottom. Now now we're going to do the next one at the top, edit Alias Northwest. The next two from the top are going to be Northeast and then Southwest. So we may need to edit some of our aliases; let's check them. I'm going to start at the bottom with Southwest, and that one looks correct in terms of we told it to highlight selected, so southwest looks good. Then I'll go up to Southern; that also looks good. Northwest, y Northern, that's cool. Northeast is cool. Eastern, not so much. And let me check Central; Central not so much. Central, let me look at Eastern again. I think I'm going to make eastern central, so I'm going to right-click on the Alias, and I believe it's going to make me put a one after it, so I'm going to make it central one for right now instead of Eastern, and then the central one, look at Southwest, the central one I think really should be like Southeast. Yeah, let's change that Alias to Southeast; we'll just roll with that, and then we can rename Central one since we didn't use Central again; we can just get rid of the one there. That's a little bit better. So I just wanted to make sure you're getting like the general idea, right, on how to create these groupings that don't exist in the data by using the lasso tool on the map. And let's go ahead and save this workbook, and we'll call it Australian ghost sightings. I just found this data on the internet, and I was fascinated by it.
Okay, so now let's go to the map menu and choose background layer, and up at the top where it says style, we're going to do the drop down; it's on light, and we're going to change it to normal. I think satellite is really cool. If we change it to satellite, I think that just looks amazing. I'm actually going to leave mine on satellite because it makes me very happy. And let's see, I'm going to do what else do I want to add to it? It I'm going to add water labels, so now you can see the bodies of water by name. There I will say that you can see more clusters of ghost sightings where the major cities are. Now, um, Australia is known for ghost sightings, in case you didn't know that, now you do, um, and so it makes sense that the larger clusters where the major cities are as opposed to other parts of the country. Go ahead and save your file.
So I went ahead and I duplicated the map sheet, and I stripped it down and replaced it so that I got this text table. So I'd like you to take this opportunity to practice on your own, and I used the latitude that when you hover over it, well, it's the third one in the list on the data Pan, um, and it's the one that says post code 2; that's the one of the region bro breakdowns that we did. So I use that, and you may need to use your show me to change the visualization to a text table. So go ahead and pause the video and build this visualization.
So now we're going to build a dashboard using these two sheets. So I'm going to bring up a new dashboard sheet, and of course the first thing I'm going to do is adjust my size and collapse that, and I'm going to drag the map on to the canvas, and then I'm going to drag the Australian ghost sightings duplicate sheet to the right side of the canvas temporarily. Now for the text table, I'm going to go to its drop down, and I'm going to make it floating, and then I'm going to resize it; doesn't need to be that large, little bit more. I'm going to get rid, I'm going to drag it to the lower left, and I'm going to get rid of its title, and then adjust the sizing little bit more, and I'm als also going to set it up so to be used as a filter. So right on its side panel, I'm going to click on the filter icon, and because I had already selected Central, now that's what's showing on the map, and it's also showing in the legend. If I want to see everything again, I can just reclick on Central; any other region will show as well. Pretty nice-looking dashboard. Let's go ahead and name the dashboard, and we'll just call it ghost sightings and save your file again.
In this module, you learned some Advanced Techniques, tips and tricks. We started by using sheet swapping so users can view one visualization at a time on a dashboard. This is useful for mobile layout but also with a desktop layout so that users can focus on one viz at a time for few for further analysis. We created two vizes for Sheet swapping, although you can have as many as you need. We then created a parameter and a calculated field for the sheet Swap and filtered the calculated field to show the current sheets vids. We also showed the parameter on both sheets. We created a dashboard and added both sheets to it and tested to swap. We moved on to creating a set and creating a hierarchy to which we added the set at the top level of the hierarchy. We were able to compare subsets of data by using this set. We changed the legend colors from the default, and we drilled down on the fields in the Shelf to see more set details. We then drilled down directly on the visualization. We created a more complex scenario by creating a set and calculated field on a new sheet. We created a visualization and then created an action from the worksheet menu to create an asymmetric drill down, which we tested at the sheet level. We modified the set action to the data source scope so it would work on a dashboard before creating a dashboard and testing the asymmetric drill down functionality. We moved on to adding a background image to the viz. We explored Advanced mapping techniques. We added a border and a Halo so the marks on the map will stand out more. Then we used the lasso tool to select regions on the map and group them. We increased the size of the marks and added background layers to the map. We tested out the different map Styles and saw that satellite is a good and compelling visual. We edited the aliases on the legend to reflect the regions we created, and then you had the opportunity on your own to duplicate the map sheet and remodel it to produce a text table viz. We then ended by creating a dashboard and making it interactive by using the floating text table as a filter.
The final module in this introductory Tableau course is sharing your data story, so we'll cover presenting, Printing, and exporting from Tableau in the second lesson. You'll learn how to share a workbook with users of Tableau desktop or Tableau reader, and the final lesson will be sharing data with users of Tableau server, Tableau online, and Tableau public. Let's go over some terms before we get into sharing your data story. Packaged workbooks contain the workbook along with a copy of any local file data sources and background images. The package workbook is no longer linked to the original data sources and images. These workbooks are saved with a .wbx file extension. Other users can open the package workbook using Tableau desktop or Tableau reader. So you can email a package workbook to a user of Tableau reader, and they can open and see its contents. Tableau reader is a free application that can be used to open and see workbooks that have been built in Tableau desktop. And then there's Tableau server; it provides browser-based analytics. After publishing your workbook to Tableau server, others with a Tableau server account can sign in to see your workbook. Tableau Cloud lets you view and share dashboards from the office, at home, or on the road. There are native mobile apps that can be accessed from the web or a mobile device. Only authorized users can interact with data and dashboards; it uses single sign-on to make security easy for trusted users. After publishing a workbook to Tableau public, anyone with a link to the workbook can see its contents. Workbooks and the underlying data saved to Tableau public are accessible to the public. Lastly, you'll see a term on the file menu, export as version; you use that if you want to save your workbook to an earlier version of the Tableau format.
There are a couple of ways that you can present your data story, and the first way, while we're still in this dashboard, is you can go up to the toolbar and click on the presentation mode button, or you can press F7 to go into presentation mode. So it gets rid of everything except your visualizations, any Legends or filters that you may be showing, um, on here. I mean, if you had text boxes or images, they would also be included in presentation View, and you can use presentation view in a data story as well, um, if your computer is connected to a presentation monitor; this may be ideal for you. To get out of presentation mode, you can go ahead and press your Escape key on your keyboard. Now another way that you can present your story is you can go to the File tab and choose export as PowerPoint. When you do that, you have a choice of what to include in the export; it defaults to this view. You can tell it to give to export specific sheets from the dashboard or specific sheets from the workbook. I'm going to leave it on this View and choose export. You can save it in your desired file location, and I'm going to go ahead and open that PowerPoint point, and it gives you a title slide with the name of the dashboard, and then it has when it was created, and you may want to get rid of that text box and maybe put something else in there, um, in there. I'm going to put I am just going to put my name; I might want to put a design on it. And then the second sheet in here is the dashboard, just that view that we asked it to put in here. This is a well-known presentation program, um, you might want to use PowerPoint just by using the export feature. And if you wanted to export all of the sheets from your workbook, including your dashboards and your stories, you could do that as well.
Let's talk about how to print your information. I'm going to go back to the File tab, and you'll notice there a print option there. You know, if you have a really great color printer and you want it to print the colors and stuff like that, this is fine. You can tell it to print the entire workbook, the active sheet, or selected sheets, and then, you know, however many copies you can go into your printer preferences, things of that nature. What I typically like to do instead of printing on a printer, um, if I have to give a printed copy to people, what I like to do is cancel that, and I like to go back to the File tab; I like to print as a PDF, and when I do that, I can choose the entire workbook; it defaults to active sheet, and if I had other sheets selected, selected sheets would be an option here. I can tell it the paper size for the PDF, the orientation, and also tell it to view I would like to the PDF after Printing and show the selections. So I'm going to go ahead and click okay on that, and here is my PDF, which I can easily attach to an email, or I can put it up in the cloud in a shared location or share it with someone from SharePoint or OneDrive or something like that. So you have a couple of options; again, you can print it to a printer, or you can print it as a PDF.
One way you can share your file with users of Tableau reader or Tableau desktop is by creating a packaged workbook. Let's go back to the File tab, and it's under export, export packaged workbook, and it will save, and you'll notice the file extension .TWBX; it will save it into your Tableau repository workbooks folder or wherever you have your file location pointing to. Again, it's the same name, so because it has a different extension, I can save it there with no conflict because the other one is also saved; the original one is saved in my workbooks, but it doesn't have the same extension. So I'm going to go ahead and choose save. Now I'm going to navigate to an email and attach that file, and you can see the icon is a little bit different on the packaged workbook, and the type is different as well, so and it's it's really kind of all the material is zipped together. So I'm going to select that one and insert it into an email, and I can send it to my other account just like that.
Let's go back to the file menu, and we're going to click on share. It lets you know that it's processing the request. You may have been prompted to log in, and then once you get to this screen, in my case, this is going to Tableau online. Now if you were prompted to log in, that screen would have said Tableau Cloud. Tableau Cloud is the new name for Tableau online. So I already have a project folder in here; if you don't, you can you can drop down and change the folder and use default if necessary. It's already given it a name. Now down here, it I have this permissions the same as my Tableau training folder in Tableau Cloud; lets me know that I have a data source embedded in the workbook, and I'm going to leave it that way, um, we could edit and change it to publish the data source separately. In this case, I'm going to leave it embedded, and then you can show or not show the sheets as tab; you can show selections, and you can include external files. So we used, um, I don't think so, not in this file, but that would be like a the logo we used in Sample Superstore stuff like that, and then you would simply click on the green publish button in the bottom. When it's done, the publishing complete dialogue pops up, and I can preview different device layouts. I can share the workbook from here; if I click on share this workbook, and it says only people with permission can see this workbook, I can either share it via email or grab a link to it, copy the link into an email so I can share this with someone else in my organization that has permission, and I can click share there, go up one level. So now this is what it published; everything it published, the first sheet, the second sheet, and the dashboard. Here gives me those three views, and then I have the data source tab, and here's it will even though we were using a live data source, now it makes an extract of it from the last time that the information was captured, which was upon us sharing it here, and that's kind of how that works. I could edit the workbook from in here if I need it to, and that's one way of getting your data story out there.
In order to publish it to Tableau public, you're going to use the server menu at the bottom, hover over Tableau public. So we're going to choose save to Tableau public, and so you're going to you're going to get an error which tells you that you need to have an extract in order for it to enable the data sources or publish the data sources, so you can't use like, um, live data connections here; you have to create an extract. So we're going to click okay; we're going to go...
To our data source tab, and you're going to choose "extract." So we're not going to do any filters; we want the extract to include all data. And then navigate to a sheet tab, and it's going to have you save your extract.
From a sheet tab or the dashboard tab, you can go back to your server menu, hover over Tableau Public, and choose "save" again. You may be prompted to log in. From Tableau Public, I can edit, I can add it as a favorite, I can share, download, nominate it for the Viz of the Day, and get to my settings. When I click on "share," I can do the current view, original view; there's embedded code; I can get a link, and I can email the link; I can tweet it, or I can send it on Facebook. I'm going to go ahead and close this dialogue.
So I misspoke just a moment ago. Um, it didn't publish the workbook to Tableau Public; it published the sheet that I was on, which was the first sheet. So I'd have to correct myself for misstating and saying, "Here's the workbook." I'm back on my dashboard, and I can connect with Tableau Server from the server menu. So at the top, it tells me who I'm signed in, or how I'm signed in, to what I'm signed in. The last one I did was to Tableau Public. Um, prior to that, it would have been Tableau Cloud, and I have the choice to sign out or sign into another server. And here you would input your server name and address, and you would click on "connect."
In this final module, you learned how to share your data story in a variety of ways. First, you learned how to present your data while using presentation view in Tableau and exporting to PowerPoint. You learned that you can print your workbook data by sending it to a printer or by printing to a PDF format, which can be attached to an email or stored in a cloud program like SharePoint or OneDrive for sharing. Then you learned how to package a workbook, which saves the external data sources and image files in a .twbx format. The packaged workbook can then be emailed to users of Tableau Reader and Tableau Desktop. You also learned how to publish to Tableau Cloud (formerly Tableau Online) and share from there to other users. Then you learned that in order to publish to Tableau Public, you needed to create an extract, and it publishes one view at a time. We ended by learning how to access Tableau Server via the server menu in Desktop by inputting the server name and address or path and choosing "connect." Thank you for viewing this Tableau introductory course.
We're going to review, by way of conclusion, what we've covered in this extensive course. When we got to Module 9, we started addressing how to make data work for you. So you learned a bit about structuring data for Tableau and how to deal with data structure issues. We used a broken Excel file and got introduced to the data interpreter. And even though the interpreter was not able to fix our data structure issues, we learned how to fix them ourselves in Tableau. And so we created some groups so that badly input information from the source data was grouped together so it would be recognized as a group, and we got an overview of advanced fixes for data problems.
Module 10 was exciting. We learned advanced techniques, tips, and tricks, starting with sheet swapping and dynamic dashboards. Then we learned how to leverage sets to answer complex questions and using background images. Then we spent time with mapping techniques using an Australian ghost sightings Excel file. And in our last module, you learned how to share your data story by presenting, printing, and exporting. And then we drilled down on how to share a workbook with users of Tableau Desktop or Tableau Reader, and then sharing data with users of Tableau Server, Tableau Online (which is now known as Tableau Cloud), and Tableau Public. Thanks for watching. To earn certificates and watch our courses without ads, check out learnit anytime.com. [Music]