From the course: Tableau and R for Analytics Projects
Create a visualization in Tableau
From the course: Tableau and R for Analytics Projects
Create a visualization in Tableau
- [Instructor] Once you have linked to a data source in Tableau, you can use it to create a visualization. The available vis types depend on your data and what you add to the worksheet, but you'll probably have lots of types to choose from. The sample file that I'll use to demonstrate the process is O204, Create Vis, and you can find it in the chapter two folder of the exercise files collection. Over on the left, I have data that I have imported. At the top, under tables, I have just the one table and I have facts or dimensions about the data. So customer name, order date, order number, continuing on. At the bottom, I have measures which are numerical values associated with each order. So I have the order total price and quantity of items within each order. I'm going to start by creating a chart or visualization based on product category by year and by quarter. So I'll drag product category to the row shelf. I could also drag it here, so I have bottle and case. And then for the columns area, I will drag order date. So when I drag that up there, I get year. I want to summarize the order total, which is the sum of the spend that my customers have done, and that will be the order total, which is the total amount spent by my customers. So order total to the data area. And there we go. I wanted it to display my data by quarter, and it's currently done by year. However, if I go up to the column shelf and look next to year, I see that there is a show detail button. It looks like a box with a plus sign in it. And if I click that, I expand. So I now get a second level of detail. So that is the quarter. I could go down further by clicking the quarters. Show detail button, and there I have month and it can go down even further. In this case, I only want to look at my data by quarter. So I'll drag month off of the shelf and I go back to year and quarter for each of my two product categories. I currently have a text table, but I can change the visualization type by going to the Show Me button, clicking it, and looking at the panel to see what is available to me. And it looks like just about everything is, actually, I think it all is. And the reason that it's available is because the data that I have fits the requirements for each of these individual data types. I'll start with a stacked bar chart, so I'll click that and click Show Me to get rid of that. And here I have my sales broken down by year and by quarter, and then also inside, by product category. So I have 2024 and 2025. Then each of the quarters are laid out here on the horizontal axis and category is summarized using color. So bottle is in blue and case is in orange. I can change the visualization type by going back up to Show Me. And in this case, because my data source includes date information about the orders, I can have a line chart. So I'll click a continuous line and then click the Show Me button again. And here I have my values broken down again, by product category, and I have the trend over time, which you can see here 2024 Q1, all the way up to 2025 Q4. If I want to have a single line of data for all sales, then I can drag product category off of the Marks card. And then I just have a single line that shows the trend for sales for this particular set of products within my company.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.