Creating Charts
Overview
Time: minObjectives
How to create Charts in Tableau
For this session, we will be using the Superstore dataset. We created 2 charts in the previous session using the same dataset. We will create some more visualizations in this session.
- Sales by Category – To visualize sales by category, we add sales from measures to column shelf and category from dimensions list.We get a horizontal bar chart. To make the visualization better, we add mark labels and change the view to fit the entire screen(highlighted in the figure below). This is the simplest graph which shows sales across all the categories in the data.
Sales by Sub-Category–To plot the sales by sub-category, add sales to column shelf and add sub-category to the row shelf.Now, click on the ‘show me’ icon on the right side of the sheet. The ‘show me’ icon is like a cheat sheet, it gives us all the typesof graphs we can plot. It also gives the number of dimensions and measures required to plot a particular graph.We select tree map from the options. We can see the visualization is created using our data but the rows and column shelf is now empty. All the fields are moved to the mark cards.We can see from the visualization, phones and chairs have the highest sales.
Sales Trend–Trend charts shows the behavior of a variable in data over time. To create a sales trend chart, we add order date to columns shelf and sales to row shelf.
But the visualization does not give us so much information about the trend. We want to see month wise trend. To do that, we click on the plus sign on the order date in the columns shelf.That gives us quarterly trend. Again, repeating the process, we get monthly trend. But we only need monthly order dates. So, we remove the year and quarter from the columns shelf.We get the graph as below.
Now, to see yearly sales trend we add order date to color mark card.It gives us the month wise trend of all years.
Looking at this visualization, we can see month wise sales activities of all the years. From the graph we can see a peak around March, September and November.Any guesses why?
- Sales by State– In tableau, we can create maps using the longitude and latitude fields generated by tableau.
- To visualize the sales across the states, we add longitude to columns shelf and latitude to rows shelf.
- To see the map of the US add states from the dimensions list to the ‘Detail’ marks card.
Next to see sales acrossstates, we add sales to colors mark card.The following visualization gives state wise sales. We can see that California has the maximum sales.
- Sales by City – We follow the same steps from the previous visualization.Just a few changes in the visualization include adding city from dimensions panel to details marks card and adding sales to size marks card(instead of color marks card).
Key Points