Beautify your Data: Intro to Data Visualization using Tableau | Tyler Pernes | Skillshare

Beautify your Data: Intro to Data Visualization using Tableau

Tyler Pernes, Data Analyst & Engineer

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
12 Lessons (1h 13m)
    • 1. Introduction

      1:13
    • 2. What is a BI Tool?

      4:25
    • 3. Getting Setup

      4:34
    • 4. Planning

      7:56
    • 5. Connecting to Data

      2:19
    • 6. Navigating the UI

      6:12
    • 7. Building Sheets

      6:38
    • 8. Graph Types

      9:30
    • 9. Calculated Fields Part I

      9:33
    • 10. Calculated Fields Part II

      9:25
    • 11. Dashboards

      10:31
    • 12. Final Thoughts

      0:43
20 students are watching this class

About This Class

Learn how to transform your data into insightful, beautiful dashboards with Tableau expert Tyler Pernes in this clear, hands-on course.

Whether you work for a large corporation or own your own small business, data is key to making the right decision.  Yet data can only take you so far without visualizing the data in a smart way.  Through a clear, step-by-step approach, this course will give you the foundations needed to build visualizations using the free version of the Business Intelligence tool, Tableau.  Key lessons include:

  • Learn how to designing a dashboard
  • Create calculated fields
  • Building graphs & lay them out on an insightful dashboard

By the end of this course, you will take the concepts you learn to build a dashboard from scratch.  You can even publish your work online to let potential employers or clients see your great work!

Downloadable links found below:

Transcripts

1. Introduction: In the modern age, data is everywhere. For good reason, businesses are realizing that you need data to make smart decisions. But oftentimes, data alone is not enough to guide this decision making. In fact, in some instances, data can get so complicated that it has the opposite effect. It causes decision paralysis. This is where data visualization comes in. By visually showing the data in a clear and actionable way, businesses can leverage the full value of the data and ensure they're making the right calls. Hi everyone, my name is Tyler Pines. I am a data visualization specialist with multiple years experience using the tool Tableau. Today, I'm here to teach you guys how to use Tableau to build visualizations. We'll go over all the fundamentals of Tableau, including calculated fields, setting up sheets, and laying out a dash. Now my goal for this course, is for people who have no experience with data visualization or minimal experience, to get set up and both the first visualization in a shorter time as possible. I am super excited to be here guys. I hope you are as well. I look forward to seeing you in lesson one. 2. What is a BI Tool?: Welcome to Lesson one. In this lesson, we will go over what a Business Intelligence tool is. Explain, why such a tool is useful and introduce you to our tool of choice, Tableau. Businesses need data to make decisions and it's easier to leverage the data if you organize it in a smart way. That's exactly what data visualization does. You can organize your data to answer specific questions, reuse Business Intelligence tools to build these visualizations. In short, these are called BI tools. Now let's dig a bit deeper. BI tool focuses on building dashboards which are slightly different to a more well-known report. Let's go over this. A dashboard is visually focused, contains multiple different charts and graphs and is usually interactive. It's focused on answering specific questions and because of the visual focus, usually intuitive to use. Here's an example of a dashboard. You can tell it's very visual and relatively intuitive to use. They answer specific questions related to happiness in this case. It has interactivity, either by scrolling over and seeing some information or by clicking and drilling down. A report on the other hand, usually has more of a table focus. It's static. There's not too much interactivity in it but, there is a lot of information that can be found in the report. Because of this info, typically pretty dense. So here's an example report with the same information as the dashboard. Now first thing, you will notice, there's a whole lot more numbers here. It's definitely more table focused and because of that, it is more dense. But at the same time, you're going to get more information. With that being said, the dashboard, I think is much easier to read it more intuitive and interactivity makes it a little bit quicker to do some analysis. Now both dashboards and reports have their place in business. Dashboards are good for answering questions quickly, while reports for better for more umbrella-like numbers that can be used by multiple teams. In terms of tools, we use a BI tool for Dashboards such as Tableau and a spreadsheet tool for reports such as Excel. Now you may be asking, why not just use Excel as a BI tool? While, you can. A BI tool provides a lot more functionality. Here's a few; Number one, data connections. BI tools have built-in native data connections to allow you to easily connect to databases and platforms. Next up, BI tools also come with built-in interactivity functionality. This means you can add interactivity through filters and actions that you can't do as easily in Excel. Then lastly, BI tools are meant to build dashboards, which means it's really fast to build these dashboards relative to Excel. Okay, so given that, why are we moving forward with Tableau? There are a ton of different BI tools on the market. Now I've used a number and I found Tableau excels in four areas. Number one is speed. It's very quick to setup a dashboard especially early on. Number two, visual customization. Some of the most beautiful dashboards you've seen online are likely using Tableau. So lot of customization you can do here. Number three, interactivity. I've mentioned this multiple times, but Tableau does Excel in interactivity. There is a free version of Tableau. Other tools have this as well but a lot of times people don't realize Tableau has a free version so I always like to bring that up. All right guys, that's it for less than one. In this lesson, we went over what a Business Intelligence tool is, compared dashboards to reports and explained why we use Tableau. In the next lesson, we'll get set up with the free version of Tableau. 3. Getting Setup: Welcome to lesson 2. In this lesson, we'll go over the different Tableau product offerings, get set up with the free version of Tableau and create an account to publish your work. Tableau has four main product offerings: Tableau Public, Tableau Desktop, Tableau Online and Tableau Server. Now the Online and Server offerings are the enterprise level ones that allows different users to view your data or your dashboards using a browser. Online is Cloud-hosted, Server is hosted internally. Now, Public and Desktop, these are the two building licenses. This is where you actually develop the dashboards and it's what we're going to be focused on in this class. Now Tableau Public is free, but with that comes a few limitations. Number 1, you have to save it online. This means you cannot say the data locally, which can be a hassle, in that if you don't have an Internet connection, you literally can't work on it. Tableau Public also is no surprise, public. That means if you have any sensitive information, you shouldn't post it online and you should probably go with the paid version of Tableau Desktop. But given that Public is free, I think it's worth it. Now, Tableau Desktop does have a cost associated with it. It's September 2018 and the cost is currently 70 bucks a month. But that may change. With that though, you can't save it locally. This isn't a huge deal, but it's nice to be able to have the privacy if need be and be able to work if you don't have an Internet connection. But the biggest thing you get with Tableau desktop that you don't get with Tableau Public is access to a lot more connectors. Desktop allows you to natively connect to all the main databases, as well as some of the major platforms. This includes Google Analytics and Salesforce to name a few. Now, given that we're going to be moving forward in this class with Tableau Public. I don't want you guys to have to pay any extra. If you already had Tableau Desktop or you plan on buying it, feel free to move forward with that. Anything you do in Tableau Public, you can also do in Tableau Desktop. Let's get set up with Tableau Public. Open up your browser and go to public.tableau.com. This should take you to this screen. In the middle, put in your email, they will ask for it and just click download the app. Now it should just start downloading. Now while that is downloading, let's set you guys up with a Tableau Public account. You're going to need this to save any of your work. Go to the top right, click "Sign In". At the bottom of this new log box, click "Create a New Account". Once you're done with that, sign in real fast. It should update to show this little icon. Just scroll up here, click "My Profile" and just make sure you see this screen. Now you will not see any of these visualizations because you haven't built yet. But make sure you can at least see your information and you can see a blank box around here. Then when that's done, let's just make sure we can open up Tableau correctly. It should take you to this screen. Now you might need to either input your login information or register, just do that. One thing I want to be careful of though, is make sure it doesn't say anything about a free trial. If it does, that means you are using the Tableau Desktop version, not Tableau Public. If you don't plan on buying Tableau Desktop, I don't even suggest going with the free trial because what might happen is you can do all this great work and then by the end of the trial, you decide you don't want to buy it. You can't transfer the work from Desktop to Public as far as I know. You'll have to redo everything on Tableau Public if you want to keep that work. That's it for lesson 2. In this lesson, we got setup with Tableau Public. Next step, we'll plan out our dashboard. 4. Planning: Welcome to Lesson 3. In this lesson, we're going to go over a crucial step of the dashboard building process, planning. I have one specific strategy to go over for you guys today. That's the QED strategy. Stands for question, exploration and design. First step is question. This is really try to figure out what are we aiming to answer. Your dashboard needs to address specific questions. This is a step you identify what those questions are. Sometimes this would be obvious, but sometimes you'll need to do a little bit of brainstorming to figure it out. Next up is exploration. In this step, we're looking to figure out what does our data support. This is where we explore the data we have, identify columns and values, and figure out if the data supports, and allows us to answer the questions we made before. If not, you may need to go back to the previous step and update the questions accordingly. Once you have that done, we now have the foundation to design, and figure out how will our dashboard look. This is where we identify different visuals, different charts, tables, you name it, to put on the dashboard, and also figure out how we should lay each of those visuals out. I suggest mocking it up. You can do this on a whiteboard, sub-type of desktop application, or just Google pen and paper. Regardless, I do think it's worth visually showing it to get ideas flowing. Now, what we're going do next. We're going to plan out our dashboard for the class project. That's to build a nutrition dashboard. I've set up a Q.E.D worksheet for you guys to download. You can download it in the course description, and it should help guide you through this Q.E.D strategy. Here's the worksheet. Step 1, let's figure out what questions to include. Now we don't know much about the question. We just know it's a nutrition dashboard. Take a few minutes just to think what questions may make sense based off what you know about nutrition. Here's what I'm thinking. I'm thinking for one question, we're going to need to just have a general idea if we're being healthy. Are we eating healthy? Will be my first question. Then if we're not eating healthy, then what? My second question is going to be, what strategies can we take to eat healthier? There you go. I'm just going to stick with these two. Once we're done with that, let's move on to Section 2, Exploration. At this point, what you should do is you should download the data-source. Explore it. It's a CSV file, which means you should be able to open it with any text editor, or Microsoft Excel, and just get an idea of what the data looks like. Try to get an idea if the data can support the questions that you're trying to answer. Here's how I would explore the data. First, I want to look at all of our available columns. We have Date, Meal, Entry, Food, Food Score, Calories, Carbs, Fat, Protein, Sodium and Sugar. Now of all these, most of them are put into it. I know what all these guys mean. I'm just going to highlight that. I know what these ones are. I know what food is that's pretty straightforward. I know what date is. Let's just check through the other three to make sure I understand it. Meal has breakfast, lunch, dinner. That helps clear that up. I'm going to say I know that one, so let's highlight that. Then entry and food score. Entry looks to be a little bit more specific than just the food that says banana, one medium banana. Whereas this just says banana. Looks pretty straightforward, but that is now. In food score, healthy, neutral, unhealthy. This looks like a categorize each food, and it says whether or not the food is healthy. I feel comfortable with the data set. I'm just going to close that. Let's go back to the Q.E.D worksheet, and let's answer the questions. Does the data sufficient support this question, are we eating healthy? Yeah, I think so. We have calories. We have a lot of other nutrient facts. I think we can definitely answer this. Question 2, what strategies can we take to eat healthier? This one is not as easy to say yes or no to, but I feel comfortable we have enough information given the columns. I mean, we have meal, so we can update specific meals, we have food, so we can cut out a specific foods as strategies. I'll say Yes, yes for now, and then I want to go back. Down here's a briefly revisit section one to update questions based on your knowledge. Now I want to go back and add something related to date. Because having date in a data set is huge, it really allows you to look at more recent time periods to see if you've improved, or got worse with anything in particular. To add the date question, I'm going to type in. Let's do. Are we eating better recently? That's pretty straightforward. Since we have date, and know that yes, we can answer that question. That's going to blink out four and five because we don't have four and five. Last step, Section 3, Design. For this one, I think you just take a little bit longer on the design stage. I do think it's probably the most important step in change of planning. Really the whole point of doing the question in exploration steps so that you have a necessary foundation to start designing. Take time, figure out what different visuals you can use to answer your questions. Then name out on some mock-up. You can do a white board, do paper, and do paint, slideshow, whatever you want. Don't worry about making a super fancy. You don't have to worry about formatting or anything like that. You can all see I have just have a square that says, "I want a line chart here." That's fine. Just have a general idea of how it's supposed to look. Okay. Here is my beautiful masterpiece. I'm just going to go over this really fast. On the top here, I am showing daily calories versus goal, could help figure out if we're being healthy or not. I answer it the overtime question by showing calories by dates. I am looking at how many calories we have. I said meal type, but actually it should be food score. How many other calories are healthy mutual or unhealthy? On the bottom right here I have a little scatter plot that compares each meal, and it compares both carbs and calories. It's nice to be able to compare two separate metrics at once. An the bottom here, I have a table that just shows the most common unhealthy foods so I can pet them out. When you guys are done building a mock-up, you can go into the class' description, click "Your Project", and then "Create a project". All you need to do at this point is upload whatever the mock-up images. You can add your Q.E.D worksheet if you want as well. We can get some knowledge [inaudible] going. If you want, you can also ask for some feedback, and I'll get back to you as soon as possible. That's it for Lesson 3. In this lesson, we've planned out our dashboard and mocked it up. Next step, we'll connect to our data. 5. Connecting to Data: Welcome to Lesson 4. In this lesson, we will connect to our data set. Let's start off by opening up Tableau, and you should see this screen. Now on the left here is a data connection plane. You almost always want to start here. If you haven't downloaded your data set, please do so now you can look at the previous video to get an idea how to. But if you have, all you need to do is to select the correct file type and then select the correct file to connect to it. So we have a CSV, which is a type of text file. So we'll click Text File. Then it's just going to open up just the explorer. So just find where in your computer it is, mine is on the desktop. So I'm just going to double-click here. What this does, this now takes us to the data connection plane. Let's go over this real fast. On the top left here is where you see all the different connections. We only have one right now. Underneath that, you can see all the different files or tables within this connection. The top right shows which tables we're connected to. The bottom right just gives a sample of that data. Now this is probably the view you guys see right now, but I'm just going to remove this. Because oftentimes you will see this. This is the default view. Now everything, it's Tableau, almost everything is drag and drop. So we are just going to come over here and drag this over. That's it. We are now connected to a data set. Let's follow Tableau, go to the, Go to Worksheet, Sheet 1 down here and we are good to go. This is where we actually started building the sheet. Now, you'll know that the data is connected because on the left here, you'll see a ton of columns that look familiar. But let's go up here and click the view data just to make sure that data looks as expected. Check the columns, check the values within each column. Just make sure nothing seems clearly off. I guess that is it for Lesson 4. In this lesson, we connected to data. Next up, we'll start building sheets. 6. Navigating the UI: Welcome to lesson five. In this lesson, we will go over the user interface and learn how to navigate around the UI. You should already have your data connected and you can see it up here. If you don't have it connected as we connected now. What you're seeing here, this is the sheet tab. This is really could match to all of the building to build our visualizations. Now, on this tab, there're five different sections of the user interface. At the top is the menu. This acts as a scene to withdraw up that menu. Next is the ribbon. This provides commonly used actions as buttons to help save you some time. The left here is the data pane. This is where you can see all your connections as well as our columns within the connection you have selected. The main area here is the view pane. This is where we do most of your building, and then at the bottom is where you create sheets in dashboards as well as delete, and rename them. It acts very similar to creating new tasks within Excel for anyone who has experienced with that. Tableau uses a drag-and-drop system to build and they drag and drop what's called a pill. Here there's, an action. Take your cursor and scroll over this meal column. Hold left-click and slightly pull it off but don't let go. Notice this blue oval, looks like a pill, doesn't it? That's why Tableau uses this term. It uses pills to drag and drop. Now keep dragging and don't let it go, and just navigate it around different areas within the view. You'll notice different visual cues. You can see a black box here, see this blue highlight or these orange errors. That means you can drop this pill within each of these different sections. Let's just stop it here on this blue highlight on the left. Okay. Cool. Now what this is showing is it's showing each meal as a row, and it's starting to look like a table. Let's build it out a little bit more. Let's say we want to see total calories by each meal. Go down the calories here, and again you drag and drop it wherever you want it. I want to put it here in the middle where it says ABC, and there we go. Now you can see total calories by each meal. Now you will notice calories is found down here on the measures, while Meal is found up here on the dimensions. Click aside on dimensions versus measures. A dimension is a field that allows us to split the data into groups. We can see meals as different groups, so meal is a dimension. A measure is a field that can be summed together. Since we can sum together calories, calories, it's considered a measure. For the most part, measures are going to be numbers. Now tableau assumes what field is a measure or it is, a dimension. But if it assumes wrong you can always right-click on a field and switch it accordingly. Either to dimension or to measure. We understand measures we understand dimensions, and we understand pills in the drag-and-drop system, but pay attention to where the pills are. You see a blue meals tool up here under a rows and a green catalyst pill over here with a t next to it. That t represents this text. Now, this brings us to an important concept of cards. A card is what you drop a pill into. There are five cards by default. Rows, columns, filters, marks and pages. A pill must fall within the card. If you drop the pill into a middle section, like we did with calories, what's actually happening is Tableau is assuming where within the view which card within the view it should fall into. That's why we need to drop it here, the pill actually appears in the marks card. Sometimes Tableau is going to assume this one, so it's important to understand where each pill should go for given visual. Now just a quick recap. Remember these two trends, a pill and the card. A pill represents a column and each pill must fall within a card. Each card represents a given aspect of the visual. Now one thing to know is that a card can have more than one point. For example, what do you think would happen if we move the food score column or pill into rows. Let's drag and drop that. We now see another column within a data set, called Food Score. You also do not need to always pull in a new column to alter the view. You can simply drag and drop an already existing pill to switch it up. Let's move the food score pill into columns and see what happens. Now we have this pivot matrix that can definitely be useful. Let's move it into filters. This is going to give us a new pop up box. This is quick, healthy. It hit okay, and now you have the sheet filter just for healthy. All right guys, that's it for lesson five. In this lesson, we went over the user interface and learned how to use the drag into our pill system. Next step, we'll start building visuals. 7. Building Sheets: Welcome to Lesson 6. In this lesson, we will go over the fundamentals of building a visualization. Learn how to use Tableau's built-in template feature and customize our visuals to formatting. All right guys, let's get our feet wet. I want you to build a bar chart that shows calories by meal. How do you think you'll do this? Well, Step 1 is to figure out what pills we're going to use. We need to use calories and meal, and then once we have that, what card would each pill fallen into? We need something on the X-axis and something on the Y-axis. Let's say we do meal on the X-axis. So drag and drop that into columns and calories on the Y-axis. Drag and drop that into rows. There we go. Just like that, we have a bar chart and I know that was simple. We can get much more robust visuals by learning about the marks card. The marks card is found here on the left. Now what this does is it changes the way marks are shown. All of marks is it's a data point found in your visualization. In this case, it's each of these bars. Now you can change what the mark type is with this drop-down above and then you can just choose whatever we want. For example, you can click line or area or choose a circle, you name it. Now, underneath this drop-down menu by multiple boxes, each box represents a different feature of the mark. To customize each feature, you can even left-click or pull in the bill. Let's say we don't like this blue bar and you want to change it. Simply click on ''Color'' and click on green. There we go. Now we have that green option. You can do the same thing to change size, as well as adding labels. Now you can also pull on the pill to change any of these features. Let's pull meal into color and they go. Now each meal is represented by a different color. Tableau comes with this pretty cool feature called the Show Me menu found up in the top right here. Now, if you click this, you're going to see a lot of different potential visualizations you can use and only have to do is click on it, and Tableau will automatically update it as so. Some of these are going to be grated out. That means you don't have the necessary requirements to build it. We can very easily see what is needed on the bottom here. Now, while this is nice that you can easily get a new visualization with just one click. The best part of this is to use it as a learning tool. If you see a specific type of chart you want to build, you can simply click on it and then see how it's setup. Where do the pills for to build that visualization? It's really good to get in the habit of building things by pulling in the pills where they belong. But early on you're not going to know that this is a great way to learn it. Now, one of the nicest functionalities that Tableau comes with is the undo and redo buttons. Now this is pretty common, a lot applications have this. I've never seen the application uses as well. You can just go undo or redo on the top left here, the hot keys are Control Z or Control Y respectively. But one thing I've found with Tableau is those no limit on what can be undo. You can undo connecting to data, you can undo building and deleting sheets. I've probably hit undo a solid 40-50 times at once. I definitely suggest getting in the habit of using these two functions. I mentioned earlier that one of the biggest benefits of using Tableau is how customizable it is in terms of visuals. With that, you're going to have a lot of different ways you can customize to formatting. Now, we can have an entire class on formatting. I'm just going to briefly go over it. Without going into much detail, all I suggest you guys do is if you want to change something, right-click on the area you want to change and hit format. This is going to open up a new pane on the left and then you're going to have a lot of options. Just feel free to play around with them to see what happens. You want to increase the font, change font to 16. Add a little bit the shading, have a look green shading and they we go and you can also open up by this drag and dropping as so. This is going to resize the head accordingly. Again, if you want to change, let's say you want to change the numbers here, right-click, ''Format'', and then you have the option. Let's talk a little bit about savings. Now I've already mentioned you have to have Internet connection to save. A, make sure you have an Internet connection and I want to bring up the fact that Tableau has crashed on me on occasion. I think that's because of the requirement to have an Internet connection. But I do suggest saving every couple of minutes just to be safe. You don't want to lose your work after working in a lot of time on it. Save, all you need to do is click up here on this ''Save'' button. It might pop-up a few boxes where you can put in your login info, as well as a title for the dash, and then it's going to redirect you to a browser to be opened, and then you can see it. Now, you might not want people to be able to view your work, at least not until it's completed. What you can do is go to the top right, click on ''My profile'', and make sure this little eyeball here has a slash through it. If it has a slash through it, that means people cannot visibly see it, if they visit your account. Again, you can just go in here, click the eyeball and now the slash is through it, and we're good to go. All right guys, that's it for Lesson 6. In this lesson, we went over the marks card, the Show Me menu, and visual formatting. In the next lesson, we'll use these tactics to build the visuals for a dashboard. 8. Graph Types: Welcome to lesson seven. In this lesson, we will go over the most common types of [inaudible] and start building our sheets for our project. Now, during this lesson, we are going to be building out each of our sheets on our markup. Step one, make sure you have your markup accessible. Here's mine. All we're going to do is go one by one through each of the sheets and build them out. Starting with this bar chart. Okay, you know how to do this one. I need the bar chart. I want foods go on the x axis and our calories as h bar. How would I do that? Well, I'll bring in food score on the x axis or columns, and then calories on the y-axis, or rows. We're done. Now at this point, if you have any bar charts, please pause the video and create them. Don't forget you can customize it using the MAX file. Now I'm just going to rename this by going to the bottom here, renamed bar chart. Just so we have it. Next step, let's build this line chart. Now at this point, I suggest you save it if you've made any sheets just in case tablet crashes, but let's keep going. Let's make a new sheet, and let's rename it to line graph. Now a line graph is similar to a bar chart. Really the main difference is instead of having a bar like, you're going to have a line one. Okay, so we have tablets on the y-axis, we know that. Let's bring that into roles. Then we're going to have day on the x-axis. Let's bring that into columns. But you're going to notice, instead of showing an entire line, we only have this one dot. Now why do you think that is? Because Tableau is assuming we want to see the year update. We don't, we want to see every single day or at least every week or every month. Let's undo this or pull it off. What you're going to do anytime you put in a date field, hold the right-click mini drag and drop it. Hold the right-click, bring it into columns, and then now you have full flexibility of what you want to choose. Now, let's choose the top option here. There we go. Now we have our line chart by each day. At this point, if you have any line charts, please pause the video and create them. Next step, let's build this scatter plot. Again, make a new sheet and let's rename it scatter plot. Now, a scatter plot allows you to compare two different measures out at once. In mine, I'm comparing each meal, so let's highlight meal in terms of both calories in carbs. We know these are going to be the three columns the three pills will be using. Okay, so which goes on the x axis and in which goes on the y-axis? Well, it looks like we have calories on the x-axis and curbs, on the y-axis. This actually is a scatter plot. The only issue is we only have one data point here. We really should be having a data point for each of our different meals. How do you think we will do that? Well, all we have to do is change something on the marks card using the pill we want to update with, meal. Drag-and-drop meal, choose really whatever you want. Let's go with color, and there we go. Now you can see each of our different meals on a scatter plot. Now let's say we don't want to change the color. Let's say you want all the colors to be the same and we just want to change or split up the point into the six different meals. I'm going to undo this. Instead of dropping meal into color, you can drop it into detail here. This effectively does the same thing, but it doesn't add any extra change to the marks. Lastly, you can add a label if you want here. Show marks label. By now it's going to default to the calorie, but let's say I want to show as the meal instead. Drag-and-drop meal onto label. They we go and then you cannot do pretty much whatever you want in terms of other customization. I kind of like these little x's. I'm going to click on 'shape' and switch to x. If you have any scatter plots in your dashboard, please make them now. Next step, let's build this table on the bottom here. Let's make a new tab and rename this table. Now tables are a little different, when you need to think x versus y-axis, you just need to think what are the rows and columns going to be. Now the rows are going to be food. Let's call food to rows, in the columns, the column it's going to be a little different. Each column represents a different measure name. In other words, we're going to have one for calories, one for carbs, one for fat and so forth. Now you may think to just pull all of these guys onto columns. But look what happens when I do that. It doesn't give you that default table setup. That's actually not the right way to do this. I'm going to undo this three times. Instead of pulling in two columns, I'm just going to pull it into where it says a, b, c. This is actually called the [inaudible]. Bringing calories, and there we go like see calories on here. If you want to add a second column, do the same thing. Bring it over wages for calories. There we go same thing with calories, same thing with protein. Whenever you have a table with multiple measures, I always suggest going through this approach. You can see what happens. Tableau actually builds these three new pills and creates this new card. I'm not going to talk about that too much. Don't worry about it too much. For the most part, If you want to build a table, just make sure you pull in each pill into that pill or that A, B, C. Now the last item I want to talk about is the number of records field here. Now, this was not in our data-set. Tableau actually automatically creates it for you. What you can do is just auto pull that in, drag-and-drop. What it's going to do is this column here. What this does it shows how often each food exists within the data-set. This is where we're going to get that occurrences field I have. If I want to reorder it, I can just hold it and scroll over it. Let's put that maybe at the start. Then I can right-click it and edit areas to change the column name. I'm going to call this occurrences. Lastly, I'm just going to open this up. If you go to the very right here in drag and drop this line now, you can see it's a lot easier to read in the now awesome and open up the column. Here we go. This is a decently table. At this point, if you have any tables, please pause the video and draw them now. Lastly, let's create this one line at the top, which is actually an entire sheet. Let's create a new sheet and I'm going to rename this single cell table because the entire table here is actually just one cell. Now everything is going to happen within this text box under the marks card. Drag-and-drop calories and you'll notice that each have one single value for calories. But what you can do, you can click into the text-box, hit this tableau dot button, and add any type of static text, such as daily categories. Then you can update formatting. I want this to be maybe bow to stick out and let's change the color to red and then hit "Apply". Now you can see those text in value all within the single cell. We can't finish up this dash or really the sheet because we still need to have daily calories. This is showing total calories, not daily. We want to have 8 percent versus go. We can't build those until we know about calculated fields, which is the topic for the next video. That's it for lesson seven. In this lesson, we note some of the most common visualizations. Next up, we'll learn about calculated fields. 9. Calculated Fields Part I: Welcome to lesson 8. In this lesson, we'll learn about calculated fields. Here's our original data set. These are considered original fields, but we can easily add new ones using Tableau. We call these calculated fields. To create a calculated field, all you need to do is move your mouse to the data pane, right-click and hit "Create Calculated Field". This is going to pop up a new box, which is where you build the field. Now, for our first example, let's create a field that adds together grams of fats and grams of carbs. First thing, let's make a title to make intuitive. We'll do carbs and fat in grams. Then all you need to do is have each field be referenced and sum up together, so click into this middle section and simply drag and drop to bring a field in, then hit "Plus". Another way you can bring a field in it just by typing, so F-A-T and you see fat is what pops up. Just click this, and we're good to go. Now, when you're done creating a field, all of these chap listener status line at the bottom, it's going to say either the calculation is valid or you have some type of error. Since we have no error here will get to go. Hit "Okay", and here it is. Let's pull this into the sheet and just see how it looks. One thing you'll notice is that the pill starts with sum. This means that Tableau is aggregating the data on the pill using this sum function. All aggregating means, is to roll up our data to output one value as sum. Here's an example. Every individual row in the data set needs to be considered unaggregated because there's only one value for calories for each row. But when you have a totals row, that's aggregated, that rose up through a sum function that say add the other rows to get to that one value. That's the difference here. Now, almost anytime you call a merger into your view, it's going to have to be aggregated. You can aggregate on the pill level, which is what Tableau is doing here, but another option is to aggregate it on the field level. We didn't include any sum function within our field, so it's unaggregated, but let's aggregate it. We're going to right-click on the field and hit "Duplicate", because we don't want to make any changes to this one. It will make a new copy, right-click on the new copy and hit "Edit", and then let's change this instead of copy to call it aggregated. Now, you might see this view with this little arrow here on the right, click that. There's very useful information on the right. This gives you a list of all possible functions, and there's a lot of them, as well as a dropdown menu on the top. Click this dropdown menu. This gives you different function types and groups them together, which is really nice. Now, since we are looking to aggregate our data, let's click on the "Aggregate" option. Now, let's scroll down, there's a lot of options here so you're welcome to play around with it you want. Let's scroll down and click "Sum". Now, this is very important. On the right here, you're going to see the syntax of the function, what the function does, and then an example. Now sum's pretty straightforward, you can see here all you need to do is sum with some type of expression or field inside of it. Let's just type sum of carbs, and then close the parentheses. Now, you'll see there's an error down here, we'll get to that soon, let's just add sum to the second one as well. Sum, open parentheses, and then after the field, close parentheses. No more error, we're good to go, hit "Okay". Now, let's drag and drop this over the item we already have. You should see a black box, and then you can see him side by side. Now, just to open it up a little bit, I'm going to take this and scroll it, it's heads up, you can move around, you can move these cards by the way, and you can resize them, so I like to open it up just so we can see the new pills. Now, you'll notice the two numbers are the same, which is good that what we expect, but you see there's now this AGG in the new pill. What do you think that is? What do you think that stands for? Stands for aggregated. Since the field is already aggregated, you cannot aggregate it in the pill level, you can only aggregate something once. In this example, we went over both aggregated and non-aggregate fields and got the same answer, but when we get to more complex fields, you'll see that those times, you need to use one or the other. A very useful type of calculated field are logic functions. Now, these gives you different results based on a given condition. If statements are probably the most commonly used logic functions and as if this, then that. Let's say we're trying to split up our meals into two separate groups: primary meals and secondary meals. Let's create a new calculate field, and call it meal type. We have to use a function, so I'm just going to search for if in the search bar on the right, and here it is, let's click on this guy. Now, as always, you should check to see what the syntax description in the example looks like. This syntax is going to be a little bit more complicated than the other ones, but we'll go through it. Let's just get started. It looks like you start with an if, and then you have some type of expression. This is where the condition goes in. What condition are we going to look at? Well, we want to know whether our meal, each meal value is primary or secondary. Well, one of the primary ones is going to be breakfast, so if meal equal and in quotations, type breakfast. The reason you need quotations is you have to let Tableau know whether or not this breakfast word should be used as part of the function or should Tableau see as a word. Tableau wants to use as a word or a string here, so we're going to do it in quotations. Well, if the meal is breakfast, what do we want to output? Well, you say then according to the syntax, and then the output in this case is going to be primary. We're done with the first line. Then you can do an else if it looks like according to the example, I'm just going to hit and I've to make it clean, else if and again, meal equal to lunch, then primary, and you can continue having as many else ifs as you want. Let's do the same thing for dinner, and that should be all the primary meals. Now, if it's not primary, it should fall on the secondary. Rather than doing else if for every other option, I'm just going to end with else. If none of these other conditionals are true, they automatically goes to this last line of else. So else, we want it to say secondary, and then you always end it with an end. Again, step-by-step, start with an if, condition 1, result 1. If that's not satisfied, they all go to condition 2, result 2, and it keeps going down in a waterfall fashion. If nothing is satisfied, it goes to the else, and then it outputs this value. Let's just hit "Okay" here, and I'm going to drag this into rows. I'm also going to drag meal right next to it to make sure it's categorized correctly. There we go. Now, we see breakfast, dinner, and lunch, are all categorized as primary, where dessert, drinks and snacks are categorized as secondary, which is what we want. That is all for lesson 8. In this lesson, we went over what calculated fields are, learned about how aggregations work, and created an if statement. In the next lesson, we'll go over some potential issues with calculated fields in creating more complex field for a dashboard. 10. Calculated Fields Part II: Welcome to lesson 9. In this lesson, we'll go over some common errors found related to calculated fields and build our calculated fields for your dashboard. Let's say we want to see a ratio of calories versus carbs. Let's create a new calculated field and call it calories per gram of carb. Now, what we'll likely need to do is put in calories and then divide that by number of carbs. We don't see an error here, so it looks good to go. Let's hit "Okay", and then let's drag and drop this in. Now, this number says that we have over 21,000 calories per gram of carb. Now, I know that sounds way too high, so something's off here. Here's what Tableau is doing. Tableau is first taking each row and it's dividing the calories and carbs within that row. This gives a catalyst per carb value for each distinguish row. Then Tableau is summing up all of these different values to get a total amount that's too high versus what it should be. The correct way of doing this is to first sum up your calories and carb fields to get total calories and total carbs. Then you want to divide the two to get an accurate ratio. This is the correct way of dealing with ratios. Let's update our calculated field to sum first. Open up your calculated field, and just outside of each of these fields, we're going to add a little sum option. There we go. No error. Hit "Okay". Now you'll notice this red pill. This means that Tableau has an error within the view. The field is fine, but what's happening is Tableau already has something aggregated and it's trying to aggregate it again, it can't do that. All we have to do is take this off and then drag and drop it back in. There we go. Now we see in number that looks to make a lot more sense versus the number we had earlier. Now, let's add another layer of complexity here. Let's say we're looking to only grab calories per gram of carb for primary meals. Now, we made a meal type calculation previously that gives us primary meals. If we can create a new calculated field, and I guess we'll just call it calories per carb, primary. If we use an if statement, and we can say if the male type is primary, show me the calories per gram of carb. If meal type equals primary, then show me the calories per gram of card. Drag that in. Then I'm just going to end it with end. I don't want to do anything else. Now, you're going to get an error here. First thing to do anytime you get a field error, so click on the little arrow on the bottom. It says, you cannot mix aggregate and non-aggregate comparisons or resorts in if expressions. Pretty much what this is saying is whenever you build a calculated field, all reference fields within that field has to be the same type. Either all aggregated or a non-aggregated. Meal type is going to be a non-aggregated here, and even though calories per gram of carbon looks like it's a non-aggregate because there's no sum, the field itself contains a sum. Just refresh that. If you open up calories per gram of carb, you can see those sums in here. This is the aggregated field. Anytime you have a ratio within if statement, you're going to have this issue. I'm going to duplicate calories per gram of carb. The way to solve this is to do the if statement within the sum. This is little bit of a different way of thinking about it. I'm going to hit "Enter" between the two parentheses here, and then I'm going to add the if statement within each of these sums. If meal type equals primary, then calories, kcal, end. All that's within the sum statement. I'm actually going to close this off to fit it, and then divide that by the same thing. Again, if meal type equals primary, then carbs end. Now, this is a little bit of a weird way of thinking about it, but this is really the only way that you can have an entire if statement in this case, that doesn't give you both an aggregated and a non-aggregated version of a field. At this point, we know a good amount about how to build calculated fields. We know about some of the errors to be careful about. Let's build out all the calculated fields we need for a dashes. Now, for mine, I only need calculated fields for my single-cell table. I specifically need to build one for daily calories and calories versus goal, ratio versus goal. Now, to build the daily calories, I'm going to create a calculated field, daily calories, and I know this is going to be a ratio, calories divided by days. Now, since it's a ratio, I know I have to aggregate beforehand. But how am I going to get days? Yes, we have dates, but that doesn't give us a count of days, it just gives us what the actual date is. There are two aggregation functions that take a count of a given field. These are count and countd, which stands for count distinct. Count gives the total instances of the field, whereas countd gives the unique or distinct instances of that field. Now, let's say this is our dataset. What will our count and countd be of the food field. Well, count's going to be five because it's a total of five instances of food, but countd is only going to be three because there's only three distinct foods. Which do you think we really need to use here? Well, we don't want to count every row since we can have multiple rows for a given day. We want the unique counts of day. The correct route is to use the countd function. We'll just type in countd, open parentheses and important date. No error. Hit "Okay". Then all I'm going to do is drag and drop daily calories over this pill to overwrite the value. Instead of seeing over 200,000 daily calories, we now show a more realistic to 2.4 thousand. Now let's figure out the other field to show which is present versus goal. For this one, we just need to compare our daily calories number versus some kind of goal through a ratio. You can either make, goal calories a field or simply put in your own amount. Let's just call this percent versus goal. I'm just going to pull in daily calories and then divide it by, I'll just say, 2,500. Hit "Okay", and then now let's also pull this in. I don't want to override it. I just want to put it back in the text. There we go. Now we could see what my percent is versus a goal. Who sounds about why? Now, couple of other quick things. You can right-click on a pill, hit "Format", and you can change the way the number is formatted here. I want to show this as percentage. Let's get rid of the decimal places. Then last item is I need to update my text. That looks decent. Now, I can see exactly what my percent is versus the goal. That is it for lesson 9. In this lesson, we went over some common calculated field errors and set up some more complex calculations. At this point, if you haven't, please stop here and finish up any calculations you need and make sure all your sheets are ready to build the dashboard. In the next lesson, we'll finally build the dash. 11. Dashboards: Welcome to lesson 10. In this lesson, we will learn how to build a dashboard and publish our dashboard online. Let's create our dash. Go the bottom bar and click this, "New Dashboard," icon. This takes you to the dashboard creations screen. Now, this screen has two separate areas. On the left is the settings pane, and in the middle is the dashboard area. Within the settings pane, you'll see those two tabs, Dashboard and Layout. Dashboard allows you to resize the dash as a whole, test how the dash looks on different devices, and stores all objects, both sheets and other objects that you can pull into the chart. The Layout tab allows to customize a single object on the dash. You can set the exact position inside of the object, as well as add design elements such as borders and backgrounds. What I want to do is to update the dashboard dimensions. Now, go to the Dashboard tab and click on this drop-down menu on the size. I like to use Fixed size Laptop Browser as my initial start. I think this is a decent width, and if you want to make it longer, you can always go into the height and change it accordingly. Once you have your dimensions set, it's time to start adding objects to the dash. Like most of Tableau, all you need to do is drag and drop objects into the view. Now, when you drag and drop an object over, you'll notice a gray box pops up. That means, this sheet will take up the entirety of the screen. Let's go and drop that in. Now, let's drag in a second sheet. Now, you'll notice things are a little bit different this time. The gray box can now fit on four separate areas either top, left, bottom, or right. Tableau organizes objects in dashboards two different ways. The default way is through Tiled. Now in tiled, Tableau assumes you have to have the entire dashboard filled. As you add more objects in, it's going to shrink other objects accordingly. Floating on the other hand, allows you to decide where exactly in the dash you want your objects. This gives you a little bit more flexibility versus tiled. To change the layout type, go to the bottom, underneath the objects section here, and you can switch between tiled and floating. Now, when floating is on and you drag a sheet in, you'll be able to see a gray box that floats over the entire sheet and drop it wherever you want. Because of this flexibility, I recommend always starting off with this option. Once a floating sheet is dropped into the dashboard, you can easily edit the position and size of it. To change the position, just scroll up to this gray bar and move it around accordingly. To change the size, scroll over the border and you can open or close it up as you see fit. If you're picky like me and want exact measurements, go to the Layout tab, and then you can change the position and size to exactly what you're looking for. To be more specific, the X and Y indicates the position the top left of the sheet is at. X is the horizontal position, while Y is the vertical one. The size is indicated by W, which stands for width, or H, which stands for height. There's even more ways you can customize an object. Click on the object, and then the top right here, you will see this, More Options drop-down menu. There's a good amount of things you can do here, but I think the most useful is Fit. If you scroll over this, you will see four options. Now, before we go into that, go to your sheet, just get an idea how big the sheet is. You'll notice how long mine is, this table, and it's even pretty wide. If we go back to the dashboard, I'm saying that sheet has to now fit within this smaller object that I'm specifying the size of. You need to tell Tableau how the table should fit in this case. Standard is default, but if you click, "Fit Width," it's going to automatically shrink the width of the sheet to fit within the object size. You can always scroll in or out to see what looks good. Fit Height does the opposite. It keeps the width to whatever the default is, but it makes sure the entire height can be shown within the view. This doesn't really make sense for tables, because it's just unreadable. An entire view does both. It makes sure that both the height and the width can fit within the size you specified. Again, completely unreadable. For tables, I almost always do, Fit Width. I don't like to do Standard. The reason I don't like Standard is, horizontal scroll bars it's not user friendly. So I typically go with Fit Width and then you can always open up the size of the cells as well as the size of any column as well. We'll just open up the whole thing to make sure it fits better. So we know all the basics, let's start building out our dashboard. Now, I'm going to build mine, feel free to start building yours at the same time. First step, I have to put in this one-line title. All I do is go to Objects, Texts and then put in the title. I'm going to put in Nutrition Dashboard and then I can update the font accordingly. Let's make this a little bigger since it's a title. I want to change the color to black, bold, underline, and I'm going to change the font to, Tableau Semi-bold. That's decent. I'm just going to open that up, and then shrink it a little bit. Great. Next step, let's add the single-cell table. So I'll drag this in, open it up. I do not want a title in this case, so what I can do is either right-click, "Hide Title," or click the drop-down menu, click the, "Title," button. Then I'm going to fit width here, because I want to take up the entire screen. Now again, the font's a little bit too small here, so I'm going to right-click, "Format," and update the font. Let's make it black, let's increase it to size 16 font. I'm actually going to change the color a little bit. Let's do blue, why not? Lastly, I want it to be in the middle, so let's click, "Alignment," and then hit the, "Horizontal." That looks good, let's just lower this some. Great. Next step, let's do the line shape. Drag and drop it in, resize it as you see fit, and I don't want the title, so right-click, "Hide Title." Done with that one, and just continue that until you have all your sheets done. Now, I'm almost done. The only thing I have left is my table. I'm going drag and drop the table in, and scroll down. The only issue is, I can't scroll down anymore. I want the table to be a little bigger, so first of all, let's make it longer. But the width is limited, I have to open up the dashboard. Let's go to, Dashboard, Size and let's increase the height to 100. From 1,000 to 1,200. Now, watch what happens to the sheet when I hit, "Enter," here. You'll notice that everything stretches. So while I'm adding a little extra space at the bottom, Tableau just stretches everything up a portion. It's a little bit annoying, it's one of the downsides of the floating object type. All you have to do is, just reposition and resize things accordingly. I am done resizing my sheets and it looks pretty good, now I can see the whole table. Now I forgot about one item. I noticed this table says, "Unhealthy Foods," but I'm actually showing all foods. So go into the sheet, all I'm going to do is, drag and drop Food Score into, Filters click, "Unhealthy," and hit, "Okay." There you go, that's how you add a filter. Now I correctly only show unhealthy foods. All right, guys, so that's it for the dashboard building. At this point, if you haven't yet, please pause the video and finish up your dashboard, or publish it soon. Make sure you save frequently, you don't want it to crash on you. Last up, let's publish this. All you have to do is click, "Save," this should automatically open up a browser as always. Then all I suggest you do is, to scroll down a little bit and edit details, add a title, add a description, then you can hit, "Save." When you're done with that, just go back to your profile, and just make sure you don't see the eye over the dash, because otherwise, other people will not be able to view it. Now, last item, if you can go into your dash and then just copy and paste your URL within the project section of the course. It would be great if we can do some knowledge sharing. The cool thing about Tableau Public is, if you allow others too, you could download the workbook, which allows you to see how someone built a visualization. All right, guys, that's it for lesson 10. In this lesson, we built and published our dashboard. 12. Final Thoughts: Congratulations guys, we are done with the course. Look I had a blast teaching this, I really hope you gained something out of it and I hope you took the product seriously. I think the best way to learn is by having hands-on experience and I really try to set up this course so that you can get that in a pretty easy way. If you have any questions, please post something on the discussion in the course description and make sure to review me. I want to know what went well, I want to know what didn't go so well, and I do plan on making additional videos, so hit the ''Follow'' button. I'll let you guys know what videos come out when they do and if you have any requests just let me know. Thanks again guys.