As our community members show every day, there are endless inventive ways to visualize your data. And while bar graphs and pie charts have their place, sometimes an advanced chart can be the perfect fit to convey the most important insights, on sight.
Tableau provides a complete range of chart styles. You really don’t even have to understand why a particular chart is better. If you rely on the show me button, tableau will provide an appropriate chart based on the combination of measures and dimensions you’ve selected.
There are some useful variations to the default chart types that require a little more knowledge to create. Knowing the type of default settings to modify, makes all the difference. In this section, you’ll review six of the most commonly used non-standard chart types.
If You Wish to Master in Tableau? Then Curated Mindmajix Tableau Certification Course
Bar-in-bar chart
Bar in bar charts provides a fantastic way to compare a measure against a goal or to display two measures against one another. Building a bar in a bar chart in Tableau is not incredibly difficult, but it does require a few specific steps that can be hard to remember if you haven’t built them a lot.
The bar-in-bar chart as you see in figure 7.32 a whole new way of comparing values.
Figure 7.32: Bar-in-bar chart
In this example, colour and size denote actual and budgeted sales. The height of each bar expresses the values of each measure for a particular region. The key to building this chart is to understand how to use colour and size while altering tableau’s default bar-stacking behaviour. To build this example, using the coffee chain sample data set, follow these steps:
Related Page:: Learn Heat Maps, Bar Chart and Line Charts in Tableau
Box plots
Use box plots, also known as a box-and-whisker plot, to show the distribution of values along an axis.
Box plots offer a way to show a very granular distribution of a measure across multiple members of a dimension set. Student test scores, website click-stream data, or per unit pricing are different analyses that might benefit from box plots. The box plot example, in figure 7.33 uses a sampling of website, click stream data for the past year.
This data set was obtained using the Google analytics connector provided with tableau software. In this analysis, you see how to create a box plot of the “time on page” measure. This data is not a part of the tableau sample data set. If you want to download a copy of the raw data file and solution, see Appendix c: “interworks book website” or the Wiley companion website for the download site URL.
Figure 7.33: Box plot of web page activity
Figure 7.34: Define the minimum/maximum reference band.
Each mark denotes average time that was spent on the website for a given sample of visitors. The thick black lines define the maximum and minimum time on site using a band-type reference distribution line. The thin red lines were plotted using a quartile reference distribution. For that type of distribution, the middle red line represents the median value of the time on site for the month.
Generating the granular detail for the box plot requires the source data to be fully disaggregated so that every value is expressed by a mark in the chart. Expose all of the rows in the data set using the analysis menu, then remove the check mark from the aggregate measures option. This will cause every row in the data set to be plotted in the view.
Figure 7.35: Define the quartile reference distribution.
The specific steps used to create the box plot in figure 7.33 are:
Pay careful attention to the scope (cell) and the label settings (none). Test your definition by using the apply button first to visually confirm that the settings are correctly defined. When you’re satisfied with the setting, lock them in by clicking the OK button.
To complete the quartile reference distribution, note the formatting that uses a gray fill, red line, and the symmetric color shading. Symmetric coloring provides consistent coloring of the quartile bands.
If you are building the box plot from the example data set, your chart should now look like figure 7.33. Box plots combine fully-disaggregated data with the intelligent use of tableau’s reference line capabilities to provide insight into the trend in activity across dimensions.
In the example, the time dimension was used to compare web activity over a twelve-month period. The extremely high time on the site in May 2013 might warrant additional digging into a more granular extract of the website activity in that month.
Related Page: What Is The Wrong Way To Build A Dashboard In Tableau?
Pareto charts
A Pareto chart, named after Vilfredo Pareto, is a type of chart that contains both bars and a line graph, where individual values are represented in descending order by bars, and the cumulative total is represented by the line.
Also known as the 80-20 rule, the Pareto principle was developed in 1906.
Pareto Charts in Tableau are very useful to Visually check whether our Data is meeting Pareto rule or not (80 – 20 Percent). For example,
In general, the (80-20) principal states that 20 percent of the inputs account for 80 percent of the output. For example, 80 percent of profits come from 20% of the products.
Figure 7.36 shows a Pareto chart that displays profit by product. The following example was built using the superstore sales sample data set. You will learn how to create a Pareto chart that plots the cumulative profit generated by each distinct product that superstore sells.
Figure 7.36: Pareto chart-profit by item
The vertical axis plots the cumulative profits expressed as a percentage of the total profits generated by the business. The horizontal axis plots the contribution of each individual product (item). Color encoding is being used to display positive and negative profit items as discrete groups. Parameterized reference lines are included, which allow the information consumer to move the lines on both the horizontal and vertical axes.
In this way the user can determine how closely the sample conforms to the Pareto principle. In the case of figure 7.36 you can see that the sample data set has 80 percent of product profits being generated from a mere 3 percent of the products. This is a much greater concentration than we would normally expect.
Figure 7.37: Vertical axis two-stage table calculation
The trick to building this type is to understand how table calculations can be used to express the axis values as percentage of the total value. The steps are required to build this chart are given below:
1. Drag the product name dimension to the columns shelf.
2. Drag the profit measure to the row shelf.
3. Sort the product name by descending profit (highest profit to lowest profit item).
4. Change the view from normal to entire view using the control on the menu icon bar. Then make the SUM (profit) field on the row shelf into a table by creating a running total table calculation.
Figure 7.38: Horizontal axis two-stage table calculation
5. Create a 2-stage table calculation by right-clicking on the field pill created in step 4 and editing quick table calculation as you see in figure 7.37.
6. Perform a data extract on the superstore sales connection by right-clicking on the connection in the data shelf, and selecting extract data/extract.
7. Drag the product name field from the dimensions shelf to the marks card.
8. Edit the product name field just placed in step 7 by right clicking on the field pill and selecting measure/count distinct.
9. Add a 2-stage table calculations to the field editing in step 8 by right clicking on the pill and add table calculation.
10. Edit the table calculation you create in step 9 to look like shown in figure 7.38.
11. Drag the new table calculation created in step 10 to the column shelf and place it to the right of the product name pill. Then drag the product name field pill from the columns shelf to the marks card. Your chart will momentarily look broken. Don’t worry, it isn’t actually.
12. Change the mark typed in view on the marks card from the automatic tool bar.
13. Create a calculated value called (profitable?) to determine if profits are greater than zero using this formula: SUM (profit)>0.
14. Place the (profitable?) calculated value on the color button located on the marks card.
15. Add parameterized reference lines on each axis that allow the information consumer to change the location of the reference line from zero to 100 percent in .01 increments. Refer to figure 7.39 to view the setting used to create the vertical reference line. The horizontal reference requires a second definition and it must be initiated from the horizontal axis.
16. Edit the color scheme to match the gray/orange colors that indicate profitability.
Once the parameterized reference lines are completed, the only remaining work is repositioning the screen elements to your task. The parameter controls in figure 7.36 are positioned below the Pareto chart to better utilize the worksheet by reducing the amount of unused white space.
Figure 7.39: parameterized reference lines
Don’t be discouraged if it takes a few tries for you to get this chart type comfortably mastered.
There are several ways you could build the chart. You may find another way to create the same effect.
The last two visualizations that you learn about in this chart are closely related to the next post on dashboards. Spark lines and bullet graphs work well in dashboards because together they convey a lot of information even when space is restricted.
Related Page: What Is The Right Way To Build A Dashboard In Tableau?
Spark lines
A sparkline chart is characterized by its small size and data density. Typically displayed without axes or coordinates, sparklines present trends and variations associated with some measurement, in a simple and condensed way. Whereas the typical chart is designed to show as much data as possible, sparklines are intended to be succinct.
Edward Tufte conceived spark lines in his wonderful book, “Beautiful Evidence Graphics press”, 2006. He referred to them as “intense, simple, word-sized graphics.” Spark lines can provide very effective time series charts in dashboards. When pixel height and width are constrained, you’ll find that spark lines can convey a good deal of information in much less space than tableau’s default time series charts. Build spark lines using the following steps:
Figure 7.40: Sales spark line
1. Create a standard time series chart.
2. Edit the axis and make each axis range independent.
3. Remove the axis headings.
4. Drag the right edge of the chart to the left.
5. Drag the chart bottom up.
6. Reduce the mark size from the marks card.
7. If necessary, emphasize change using a table calculation.
Figure 7.40 shows a spark line made by using the coffee chain sample database.
In this example it was necessary to use a percent change table calculation to emphasize the change in sales month over month. Why? The data was boring and contained very minimal dollar changes, resulting in the dead man EKG effect, or flat-lines on every row of the time series when the view was compressed. A nice feature of employing a table calculation for percent change is that a very light gray dotted line appears in each chart denoting the zero change level.
In addition, some of the normal formatting elements have been removed from the view axis titles, row and column headings, and the lines separating each product cell have been de-emphasized with a very light gray color.
You will build a spark line in combination with a bullet graph as part of an exercise in the next post on dashboard technique.
Checkout Tableau Interview Questions
Bullet graphs
A bullet graph is a variation of a bar graph developed to replace dashboard gauges and meters. The bullet graph is generally used to compare a primary measure to one or more other measures in the context of qualitative ranges of performance, such as poor, satisfactory, and good. You can create a bullet graph by adding two reference lines: a distribution to indicate the qualitative ranges of performance, and a line to indicate the target.
Bullet graphs were developed by Stephen few as another means for efficiently comparing metrics in a limited space. Basically, bullet graphs are bar charts (comparing one-to-many relations ships) with the addition of comparative reference lines and reference distributions. Bullet graphs, in combination with sparklines, are an excellent combination in dashboards because they are space efficient and insightful. Look closely at the bullet graph in figure 7.41.
Figure 7.41: Bullet graph
The bars in the bullet graph have been color-encoded to reflect the result of a Boolean (true/false) calculations that evaluates actual versus planned sales. Product that are encoded in blue are below plan. The cell-level reference lines in red reflect the budgeted sales value. The gray encoding of the reference distribution behind the bars reflects levels of performance versus the budget as well (60 percent, 80 percent of budget). Also notice that the color of the actual sale bars has been faded to 6 percent by using the color button on the color shelf. So, this bullet graph was built using show me, but includes several appearance tweaks to enhance understanding. The steps required to build the example, in figure 7.41 included:
1. Open the coffee chain sample database.
2. Multi-select sales, budget sales, product type and product.
3. Click the show me button.
4. Check that the bars use actual sales.
5. Check that the reference line uses budget sales.
6. If the items 4 and 5 are wrong, right-click on the bottom axis and choose the swap reference line fields.
7. Create a Boolean calculation sum ([sales])
8. Drop the Boolean calculation result on the color button.
9. Style the reference line to taste.
10.Style the reference distribution color scheme to taste.
The bars in bullet graphs should reflect the actual value. The reference line should reflect the comparative value (budget, prior year, etc.). Tableau does n’t try to determine the actual versus target value when the graph is created automatically using the show me button. You may have to use the swap reference line fields option that is accessed by right-clicking within the white space of the bottom axis. This swaps the pill placed in the column shelf and the marks card. It should make sense by now that the pill being expressed in the column (or row shelf) is plotted using the bar. The pill contained in the marks card is used to create the reference line.
The combination of spark lines and bullet graphs in dashboards provides a very space efficient way to display one to many relationships, performance to plan, and performance versus prior years (if you add reference lines for that). The spark line provides a very dense information-packed display of performance over time. Figure 7.42 shows them aligned in a dashboard.
Figure 7.42: Bullet graph and spark line
In the next post, you will learn about best practices for dashboard design-using a bullet graph and spark line along with three other visualizations to create a compact, information-rich dashboard design.
List Of Tableau Courses:
Tableau Advanced |
Tableau Server |
Data Visualization and Dashboarding Fundamentals |
Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:
Name | Dates | |
---|---|---|
Tableau Training | Nov 19 to Dec 04 | View Details |
Tableau Training | Nov 23 to Dec 08 | View Details |
Tableau Training | Nov 26 to Dec 11 | View Details |
Tableau Training | Nov 30 to Dec 15 | View Details |
As a Senior Writer for Mindmajix, Saikumar has a great understanding of today’s data-driven environment, which includes key aspects such as Business Intelligence and data management. He manages the task of creating great content in the areas of Programming, Microsoft Power BI, Tableau, Oracle BI, Cognos, and Alteryx. Connect with him on LinkedIn and Twitter.