Chapter 7
Tips, Tricks, and Timesavers

Mastering the basics of building visualizations and dashboards isn’t difficult or time-consuming. Most people achieve good results without having to spend a lot of time learning the nuances of data visualization or mastering more advanced techniques.

In this chapter, you learn timesaving tips for building views, altering the default formats of fields and axis headers, creating new fields, and customizing the content and appearance of tooltips. I explain a trick for using legends to change the order data in views. After I cover customizing shapes, colors, and fonts, I present useful advanced chart types that demonstrate how to create more advanced chart types that aren’t directly supported using the Show Me menu. The chapter closes with an introduction to some simple methods for creating subtle behavior in dashboards that will set the table for a more extensive treatment of dashboard-building in Chapter 8.

Saving Time and Improving Formatting

There are typically several ways to accomplish desired results in Tableau. Becoming faster at achieving the outcome takes a little practice. Knowing shortcuts that save seconds when you are creating an individual view can add up to hundreds of hours per year. If your team has many people using Tableau, the time savings can be significant.

Double-Click Fields to Build Faster

Double-click any field to quickly create a view or add it to an existing view. If you are working with a file-based data source (Excel or Access), you can utilize the Measure Names and Measure Values fields to quickly create an overview of an unfamiliar dataset. Warning: Do not use this technique if you are connecting to a very large database as it may overload your system. Start your analysis by double-clicking on the Measure Names field. As a result, every measure contained in the data window is displayed as a text tables—providing a quick view of the facts contained in the dataset. Add a time element to see value breakdowns. Figure 7-1 required only three mouse selections to generate.

c07f001.tif

Figure 7-1: Double-click to review all measures.

When you dive into a dataset for the first time, knowing measure totals, the number of records in the set, and the breakdown over time helps you reconcile amounts in your views against source data batch totals. Figure 7-1 was created by:

  1. Double-clicking Measure Names
  2. Clicking the Swap icon
  3. Double-clicking Order Date
  4. Selecting the menu option Analysis ⇒ Totals ⇒ Show Row Grand Totals

With a little practice, you’ll be able to create that type of view in under six seconds. When diving into a file-based dataset for the first time, it’s the fastest way to get some benchmark information.

Reduce Clicks Using the Right Mouse Button Drag

To save time when you want to display dates, numbers, or text, use the right mouse button when you drag fields into a view. Using this method to place the field pills opens a dialog box that gives you access to more presentation options and significantly reduces the number of mouse clicks required to customize the result. Figure 7-2 shows the three different dialog boxes that are provided.

c07f002.tif

Figure 7-2: Exposing field options

The first option in Figure 7-2 is the dialog box presented when a date field is placed with a right-click drag. Option two is for measures, and option three is for a non-date dimension. In each case, the right-click drag and drop provides direct access to all the available options for expressing time, measure aggregation, and different ways strings can be expressed.

Quick Copy Fields with Control-Drag

Holding the Control button down while dragging an active field causes a copy of that pill to be created wherever it’s placed. This is particularly helpful if you want to build a Table Calculation using an active field or if you want to use a measure or dimension that is expressed in the Rows or Columns shelf on the marks card as well.

Replace Fields by Dropping the New Field on Top

Dropping any measure or dimension on top of a field already expressed in the view will result in that field being replaced with the new selection. This is particularly useful if you are exploring a dataset for the first time and want to cycle through a variety of measures using the same view. After creating an initial view and then duplicating that chart, you can use this technique to quickly create a series of charts, each displaying a different measure.

Using tooltips to drill into details exploring marks within a view generates questions when you find outliers. Figure 7-3 shows how you can use a tooltip to expose the underlying source data.

c07f003.tif

Figure 7-3: Use the tooltip to expose the data.

The tooltip contains a button on the far right that can be used to expose a summary of the mark’s makeup, all of the details contained in the dataset pertaining to that mark, or selected details. Rearrange columns within the exposed table by dragging them manually. You can also sort the rows by clicking any column to toggle between ascending or descending sorts of the data included in the column selected. If the tooltip doesn’t include the details you want to answer your question, this technique will provide access to the all of the dimensions and measures available in the source dataset.

Right-Click to Edit or Format Anything

If you don’t like the appearance of any element contained in a view, a quick way to get to the appropriate formatting option menu is to point at the objectionable element, right-click, and select Format. A context-specific formatting menu will appear in place of the data shelf area on the left side of the workspace. Figure 7-4 shows how flexible formatting can be.

c07f004.tif

Figure 7-4: Right-click formatting

Special formatting in Figure 7-4 has been applied to rows, columns, panes, totals, and subtotals. Year headers are in a green font. The headings for each quarter, the subtotal heading for each year, and the grand total heading for the column displaying the grand total for both years are colored blue. The “All Years” text was edited from the default “Grand Total” heading text. A custom red color was applied to the year total panes, and a custom black bold font was applied to the column totals at the bottom of the text table by applying a custom font to the pane and header of the Grand Total row. Finally, two different shades of red were applied to the row banding in the pane and in the header. While there is more than one way to apply these customizations, the easiest way is to point at the screen element and right-click, and Tableau will present the appropriate set of formatting controls on the left side of the workspace.

Editing or Removing Titles from Axis Headings

Sometimes it is desirable to edit axis titles or remove them entirely. This can be done by pointing at the axis (white space or header) and selecting the Edit Axis option. Figure 7-5 shows the menu that is displayed.

Not only does the Edit Axis menu allow you to edit or remove the axis title (without removing the axis header), but you can also modify the title or erase the title in the Titles box you see in Figure 7-5. Later in this chapter, you’ll see how a range selection can be used to create a Sparkline chart.

c07f005.tif

Figure 7-5: Edit axis menu

Quicken Your Presentation Page Views

Making your presentations truly interactive by replacing static slide decks with interactive visualizations provides a powerful and flexible story. If your Tableau workbook has many different worksheets and dashboards, loading each new worksheet can cause delays as each worksheet or dashboard is materialized. Avoid delay by preloading your dashboard views.

You preload views by accessing the multiple worksheet view (the PowerPoint slide deck style view) from the tab in the upper right of the screen. Figure 7-6 shows all of the worksheets and dashboards contained within the workbook.

Right-clicking in the worksheet window exposes a menu option—Refresh All Thumbnails—that triggers Tableau to query the data source(s) used for all the worksheets and dashboards in the workbook. Now as you run through your presentation, each worksheet and dashboard will be preloaded and materialize instantly.

You can also trigger a query of all of the data sources via the Filmstrip view of worksheets, as shown in Figure 7-7.

c07f006.tif

Figure 7-6: Worksheet window

c07f007.eps

Figure 7-7: Filmstrip view

Turn on the Filmstrip view by clicking the small up and down Show Filmstrip option in the lower right of the worksheet. Trigger the worksheet by right-clicking within the filmstrip sheet area shown on the right side of Figure 7-7.

A Faster Way to Access Field Menu Options

Hovering over a field pill that is placed anywhere in your worksheet will expose a drop-down arrow located on the right side of the pill. Clicking on the drop-down arrow exposes menu options related to the measure or dimension. Figure 7-8 shows the exposed menu.

c07f008.eps

Figure 7-8: Exposing a pill menu

An easier way to expose the same menu is to point anywhere at the field pill and click the right mouse button. The same menu will be exposed in a way that requires less precise pointing.

Zooming the Formula Dialog Box

Did you know that you can zoom inside the Calculated Field formula dialog box? Try creating a new calculation. After you get some text in the Calculated Field dialog box, press the Ctrl button and use your mouse scroll wheel to increase or decrease the size of the text. On the Mac you do this by pressing the Command button and swiping your mouse to the left or right.

Drag a Field into the Formula Dialog box

A shortcut for entering fields into the Formula dialog box is to drag a dimension or record into the Formula dialog box and drop it. If you do this while pointing at a field in the Formula dialog box, you will replace that field with the new one.

Swap Data in Pane and Reference Line Fields

If you have a visualization that includes related measures—one being used for the data plot and another being used to plot a reference line—you can swap the two measures so that the Reference Line field is used as the source for the marks in the view and the plotted measure is now used for the reference line.

Improving Appearance to Convey Meaning More Precisely

Your dashboard and worksheet designs need to fit in the available space. For this reason, headings, instructions, and details related to your views—conveying the information while using as little space as possible—is desirable. The techniques are space-efficient without compromising meaning.

Changing the Appearance of Dates

Alter date formats that appear on an axis by pointing at the date header, right-clicking, and selecting the Format Menu option. This exposes many different date formats—including a custom formatting option, as shown in Figure 7-9.

c07f009.tif

Figure 7-9: Customizing date formats

The specific date formatting available will vary depending on the type of date being expressed (continuous or discrete). Continuous dates provide more formatting options than discrete dates.

Formatting Tooltip Content

Tooltips in worksheets and dashboards can be improved by adding fields that are not included in the view, formatting text font and color, and adding instructions. Edit your tooltip from the main menu by selecting Worksheet ⇒ Tooltip. Figure 7-10 shows a modified tooltip that uses custom colors, custom font sizes, field name revisions, and explanatory text along with contact information.

c07f010.tif

Figure 7-10: A customized tooltip

Note that any fields included on the Marks cards can be added to the tooltip. Tooltips are a space-efficient way to add details on-demand to worksheets and dashboards.

Change the Order of Color Expressed in Charts

When using colors to express members of dimensions, comparing different members in the set is easier if the item you want to focus on starts at the same point on the axis. Figure 7-11 shows a stacked bar chart that compares the sales mix percentage of product categories in different date aggregations (month, quarter, and year) by using a quick Table Calculation and color to express the relative sales for each product category.

Dragging the Furniture color to the bottom of the color legend, as shown on the right of Figure 7-11, enables more precise comparison of the furniture product category.

c07f011.tif

Figure 7-11: Reordering the color legend

Exposing a Header in a One-Column Text Table

Adding a small text table in a dashboard can provide an effective means for triggering a filter action. For this reason, you may want to create a very basic text table, as you see in Figure 7-12.

c07f012.tif

Figure 7-12: No heading over the sales values

The chart was created using the Superstore dataset. Building Figure 7-12 requires two steps:

  1. Double-click the Region field in the Dimensions shelf.
  2. Double-click the Sales field in the Measures shelf.

This is fast and easy, but what if you want to add a header directly over the sales values to create a well-labeled text table without having to add a worksheet title? Worksheet titles consume additional pixel height, which may take more vertical space than you have available.

At this point, there is a row label over the region names in Figure 7-12 but no row header over the sales value. Tableau’s default behavior doesn’t provide a row label when only one measure is included in the view. To get a header to appear immediately above the sales values, double-click any other field included on the Measures shelf (except for the geocoding measures used for mapping) and then point at the column heading of the second measure and right-click to hide the measure. Alternatively, right-click the Measure Values pill (which automatically appeared on the Marks card when the second measure was added) and filter out the new measure so that the Sales field is the only measure remaining in view. The text table should now look like the one in Figure 7-13.

c07f013.tif

Figure 7-13: Text table with a sales header

Figure 7-13 presents a very compact view of the sales by region with headers directly above the field values. This text table could be placed into a dashboard requiring the same amount of space as a multi-select filter but providing a little additional data. Another way to build the same text table is to use Measure Names and Measure Values directly to build the view. Follow these steps:

  1. Double-click the Region field on the Dimensions shelf.
  2. Double-click the Measure Names field on the Dimensions shelf.
  3. Right-click the Measure Values pill on the Marks card.
  4. Filter out all of the measures leaving only the Sales selected.

The key point in this example is that Tableau will not provide a header over the measure when only one measure is in view. You will use a text table like this in a dashboard example that you build in Chapter 8.

Unpacking a Packaged Workbook File

Unpacking a Tableau Packaged Workbook (.twbx) file allows you to view the original data source. Unpacking is useful if your data source is file-based (Excel/Access/CSV). To open this type of file, point at it and then right-click and select the Unpackage option. Tableau creates a data folder that contains a copy of the file source.

Make a Parameterized Axis Label

Using parameters to alter the measure plotted in a view is an excellent way to make one chart serve many purposes. But the default axis label isn’t very informative, as you see in Figure 7-14.

c07f014.tif

Figure 7-14: Axis label default

The time-series chart on the left of Figure 7-14 displays the default axis label for the parameter control Choose Measure. To enable a dynamic parameterized label for the axis, follow these steps:

  1. Drag the parameter from the parameters shelf to the axis.
  2. Drop the parameter on the axis.
  3. Remove the default axis title by right-clicking on the axis.
  4. Erase the default title in the titles area.
  5. Right-click the parameter heading and hide the field label.
  6. Rotate the parameter label by right-clicking it and selecting Rotate.

Using Continuous Quick Filters for Ranges of Values

When your worksheet or dashboard contains a continuous Quick Filter, many people don’t realize you can restrict the range of values and then drag them from within the range to scroll. Figure 7-15 shows a bar chart that displays sales by customer and a Quick Filter using profit.

c07f015.tif

Figure 7-15: Filtering for a range of values

Restrict the range by dragging the bar handles in or by typing specific values in the filter values. You can see that the range has been restricted from $0 to $5,000. To scroll, point at the gray area in the filter bar and, while pressing your left mouse button, drag the range to the left or right to move through the entire set in $5,000 profit range increments.

Create Your Own Custom Date Hierarchy

Tableau’s automatic data hierarchies save a lot of time, but what if you don’t want to display all of the hierarchy that Tableau provides? By creating custom dates, you can combine them into hierarchies that meet your specific needs. Figure 7-16 shows a bar chart comparing sales values for specific dates.

The custom hierarchy includes discrete year and quarter values and nothing more. Notice that the Date Year pill can be expanded by clicking the plus sign, but the grouping of the custom Date Year and Date Quarter overrides the normal date hierarchy structure within Tableau.

c07f016.tif

Figure 7-16: Custom date hierarchy

To create custom date hierarchies, follow these steps:

  1. Point at a date field in the dimension shelf and right-click.
  2. Select the Create Custom Date option.
  3. Edit the date as you require.
  4. Drag one date field on top of another to create the custom hierarchy.
  5. Use the custom hierarchy in your view.

Figure 7-17 shows the custom date dialog box being accessed from the menu.

c07f017.tif

Figure 7-17: Building a custom date hierarchy

Complete the date by giving it a specific name. Use the Detail drop-down selector to pick the exact date granularity you desire. The radio buttons below that define whether the date is a discrete date (date part) or a continuous date (date value).

After the custom dates are defined, drag one on top of another in the dimension window to create your custom date hierarchy. You can right-click and edit the name of the hierarchy as desired. This technique is particularly useful in dashboards when you might need to limit the expansion of the hierarchy so that the chart fits into the available space nicely.

Concatenating to Make Custom Fields

This is a favorite easy formula hack for creating key records on the fly if your data source doesn’t really include a truly unique key record. To create a new field that is the combination of two or more fields, use the Formula Editor. Figure 7-18 shows a concatenation formula.

c07f018.tif

Figure 7-18: Concatenating fields

Using the + sign between each field creates a concatenated (joined together) field that will be available in the Dimensions shelf. This is also useful when you want to assemble addresses from discrete fields to create mailing lists. In Figure 7-18, the formula also inserts a literal string including a comma and a space between the Customer Name and City fields. If you experience performance degradation using this technique, try combining sets. Refer to Chapter 3 for more details.

Using Legends to Build Highlight Actions

Color or shape legends can be used to create highlight actions. Activate a color action by selecting the highlighting tool in the legend, as you see in Figure 7-19, and then click any color.

Similarly, the shape legend in Figure 7-19 can be used to create another highlight action. The resulting action in the dashboard will use the combination of color and shape when selecting marks from the scatter plot, as you see in Figure 7-20.

c07f019.tif

Figure 7-19: Creating a highlight action from a color legend

c07f020.tif

Figure 7-20: Highlighting using actions generated by the color and shape legends

Selecting a blue circle in the scatter plot triggers the highlight action—changing appearance of the scatter plot and bar chart. The combination of Order Priority (shape) and Product Category (color) are highlighted. Tooltips for both items have been displayed together in Figure 7-20 to expose the details for you to review. Tableau normally displays only one tooltip at a time.

You can view the Action definitions by going to the Dashboard menu, selecting the Actions option, and then selecting Edit. Figure 7-21 displays the menu details.

This time-saving technique will be used in the dashboard example you create in Chapter 8.

c07f021.tif

Figure 7-21: Highlight action menu

Formatting Null Value Results

Table Calculations use your visualization to create new values. If the calculation defined results in a null value, Tableau provides a variety of formatting options that allow you to control exactly how the null results are presented in the resulting chart. Figure 7-22 shows six time series visualizations. Area 1 in the upper left is an unedited plot of the data using a Table Calculation. The remaining panes show different ways that you can control how null values are displayed.

The dialog box displayed in Figure 7-22 (area 1) shows the unedited plot of a quick Table Calculation for a three-month moving average. The actual quick table definition is shown in Figure 7-23.

c07f022.tif

Figure 7-22: Time series with null values

c07f023.tif

Figure 7-23: Three-month moving average

Note that the indicator in the dialog box in Figure 7-23 (Null if there are not enough values) is checked. Selecting this tells Tableau not to plot marks if there is insufficient data to correctly calculate the result. This means that no mark will be plotted if any month included in the time series does not have data for the three preceding months. As a result, area 1 of Figure 7-22 isn’t plotting any marks for January, February, or March because the dataset doesn’t include date for the preceding October through December time period.

One way to deal with the null warning that is displayed in Figure 7-22 (area 1) is to right-click the 3 nulls pill to expose the Hide Indicator control shown in Figure 7-24.

c07f024.tif

Figure 7-24: Hiding the null indicator

Selecting the Hide Indicator option merely removes the null warning pill from view without defining how additional null values should be treated. If your source data is being updated regularly, this selection hides the null indicator without providing any additional formatting rules for Tableau to use if new null values appear in the data. You see the result in Figure 7-22 (area 2).

If the (nulls) pill is selected using the left mouse button, the dialog box shown in Figure 7-25 is displayed.

c07f025.tif

Figure 7-25: Show at default value

Showing the data at the default position causes Tableau to draw the line for the months with null values at zero, as you see in Figure 7-22 (area 3). If the Filter Data option is selected, as you see in Figure 7-26, Tableau will filter the null value months from view.

c07f026.tif

Figure 7-26: Filtering out nulls

Notice the axis for Figure 7-22 (area 4) starts in April. This option might be misleading if the source data includes gaps in the middle of the time series. For this reason, Tableau provides two additional options to format null values.

The bottom charts in the dashboard Figure 7-22 (areas 5 and 6) look similar to the chart in area 2 only because the null values in this example occur in the first three months of the time series. If the null values had occurred in the middle of the time series, these options provide slightly different treatments of the data breaks in the plot. To access the Special Values (for example, Null) formatting dialog box, right-click the field pill that you are using to express the Table Calculation and select Format. This exposes the formatting menu for the pane, as shown in Figures 7-27 and 7-28.

Hiding break lines results in the view you see in Figure 7-22 (area 5).

c07f027.tif

Figure 7-27: Hiding break lines

Figure 7-28 shows another option for handling nulls. You can see the result in Figure 7-22 (area 6).

c07f028.tif

Figure 7-28: Hide connect lines

Because the null values appear at the beginning of the date range, the result looks the same using these options. Experiment with these options when your data includes nulls within the middle of the range. One will filter out the month entirely from view, and the other will show the month but without connecting the lines.

Table Calculations offer many options for deriving new information from your source data. Tableau’s formatting options for null values provides for nuanced treatment of missing values in your source data so that information consumers are not misled by gaps in your source data.

When to Use Floating Objects in Dashboards

Tableau supports the use of Floating objects, and this can be a great way to add information to your dashboards efficiently. This facility should be used with care. Think about how the underlying visualization can change and ensure that the floating object doesn’t obscure the data contained in the view. Figure 7-29 is an example of a suboptimal use of floating objects.

The floating year filter and color legend in Figure 7-29 are space-efficient, but the Office Furnishing mark is obscuring the color legend. Floating objects in this chart are not a good choice unless you can be certain that the products in the top third of the view won’t extend into the floating controls. Controlling this is impossible because your audience’s computer resolutions will be different and the resulting plots on their computer screens will be different. Figure 7-30 shows a better use case for floating objects.

Presuming that sales occur only in the lower 48 states, the Floating objects in Figure 7-30 take advantage of the white spaces contained in the map to display color and size legends as well as a time series chart. A filter action could be added to the map and the time series to filter the view for selections made by the user—creating a more compact view than would otherwise be possible with the use of non-floating controls and quick filters. This use of floating legends is less susceptible to the problem highlighted in Figure 7-29.

c07f029.tif

Figure 7-29: A bad use of Floating objects

c07f030.tif

Figure 7-30: A better use of Floating objects

Combined Axis Shading in a Scatter Plot

Shading from a single axis in a scatter plot is easy. But what if you want to shade using a combination of the vertical and horizontal axis? Figure 7-31 shows four possibilities.

c07f031.tif

Figure 7-31: Scatter plot shading

The scatter plots use two reference lines to color the quadrants: one reference line for the vertical axis and another reference line for the horizontal axis. The key to getting this appearance is knowing how to apply the color fill for the reference lines in each example. Figure 7-32 shows the combination of fill options to achieve each view.

The quadrant color effect is created by the overlapping shading from the vertical and horizontal axes. This isn’t the only way you could achieve this kind of output, but the cheat sheet provides a reliable shortcut as a starting point. Figure 7-33 shows you the settings used to create Scatter 1 in Figure 7-31.

c07f032.tif

Figure 7-32: Shading cheat sheet

c07f033.tif

Figure 7-33: Settings for Scatter 1

Try building your own scatter plot using the Superstore for TYD2 dataset. Make your vertical axis a plot of Profit and the horizontal axis a plot of Shipping Cost. Place Product Category on the color Marks card, Order Priority on the Shapes Marks card, and Customer Name on the Detail Marks card. Next add a vertical reference line by selecting the Analytics tab in the Data pane and then dragging the Reference Line into the view. Pick either Table or Pane while selecting the Sum (Profit) area in the Reference Line dialog box. Alternatively, right-click on the vertical axis and select the Add Reference Line option. Use the shading cheat sheet in Figure 7-32 to assign the correct settings for Fill Above and Fill Below. Repeat the procedure for the horizontal axis. See if you can build all four of the plots displayed in Figure 7-32.

Creating Folders to Hold Fields

If you have to deal with database information, there can be hundreds of fields to search through. Tableau provides a search function at the top of the data pane to make it easier to find a specific field. Hierarchies can be useful for grouping fields in the data pane, but what if you don’t want the behavior of a hierarchy in your visualizations?

Folders provide a way for you to group related fields within the data pane without having a hierarchy. To group fields in the Data pane, right-click in the white space within the Dimensions shelf (to group dimensions) or the Measures shelf (to group measures), and then select the Create Folder menu option and name the folder as you see in Figure 7-34.

c07f034.tif

Figure 7-34: Creating a folder

Grouping related fields in folders is a timesaver if you find yourself using related fields to create analysis.

Customizing Shapes, Colors, Fonts, and Images

Tableau comes with a wide variety of predefined shapes, colors, and fonts, but you can style these objects to meet your specific needs.

Customizing Shapes

There is nothing wrong with using the default shapes, as you see in Figure 7-35.

c07f035.tif

Figure 7-35: Map with standard shapes

Customizing the shape used to plot weather conditions provides more immediate understanding. Figure 7-36 shows the same map, but with weather images to depict weather conditions.

The use of customized images in Figure 7-36 conveys weather conditions more intuitively. This example was created using one of the available standard shapes provided in Tableau’s shape palette. Editing shapes is done by accessing the Shape menu from the Shape legend you see in Figure 7-37.

c07f036.tif

Figure 7-36: Map with weather images

c07f037.tif

Figure 7-37: Customizing shapes

If Tableau’s standard shape legend or palettes do not fit your requirements, import custom shape files (.png, .jpeg, .bmp, .gif) and make them available to use in your views by following these steps:

  1. Create a folder to hold the image files under My Tableau Repository.
  2. Give the folder a one- or two-word name (Tableau uses This Name).
  3. Create a view that uses shapes.
  4. Edit the standard shape by selecting the imported custom shape.

The best results are achieved using images that are sized at (32 × 32) pixels.

Customizing Colors

Creating customized colors for individual marks can be done easily using the Color button in the Marks tab. Make a custom color by clicking the Color button and selecting the More Colors option. This exposes the window shown in the upper left of Figure 7-38.

You can also pick from a wide variety of border color options by modifying the border using the Marks card ⇒ Border menu, shown in Figure 7-38 just below and to the right of the Color dialog box. Select the Add To Custom Colors option to expose a wide variety of color tools for border color customization.

c07f038.tif

Figure 7-38: Customize an individual color.

It’s also possible to create completely customized color palettes. Tableau took great care to create default color palettes that effectively communicate. They considered factors such as color blindness—providing gray scale and a specific color-blind–friendly palette. If you have a specific need that the available color palettes don’t fulfill, try mixing colors from different standard palettes. If you do have a very specific need (perhaps matching a logo color scheme), creating a completely customized palette is possible, but you have to modify Tableau’s preferences file located in My DocumentsMy Tableau RepositoryPreferences.tps.

Search Tableau’s website for a knowledge base article called “Creating Custom Color Palettes” for specific details. You’ll need to use a text editor (such as Windows Notepad) to add the custom palette by adding an XML script that defines the palette name (as you want it to appear) and then define the color values.

Customizing Fonts

Tableau provides a wide range of fonts. You can customize the font style, size, color, boldness, and underlining for every element of text contained in headings, axis labels, mark labels, and tooltips. In most cases, the standard font selections work fine. Changing the font style of dynamic title elements is a very common use and helps people notice that values in dashboards change when selections are made. The most common need for customizing fonts is to modify the title font in a pane or dashboard. Double-clicking in the area opens a text editing dialog box, as you can see in Figure 7-39.

c07f039.tif

Figure 7-39: Customizing fonts in titles

The text in the editing area of the dialog box has been modified to display many different font styles. You change fonts by highlighting existing text and selecting another font style from the menu at the top. Figure 7-40 shows custom font colors in a title but also includes a dynamic title element, <Sheet Name>.

c07f040.tif

Figure 7-40: Dynamic title elements

In Figure 7-40, the Year Filter in the left section of the view filters both charts contained in the dashboard for year. You see that 2013, 2014, and 2015 are selected, and the title for each pane in the dashboard reflects those years in the title block. You add dynamic title elements by double-clicking the title and using the insert button to select the field. For the field to be available, you must use it in the view somehow or include it on the Marks card.

Customizing Images in Dashboards

The most typical use for an image in a dashboard is to add a company logo. By using the image object, logos can be placed and sized to fit in the title space. There are a couple of tricks you should be aware of that will help you fit images precisely. The InterWorks logo is a standard JPEG file. After placing the image object into the dashboard at the desired location, select the Pick Image option by pointing to the upper-right corner of the object to expose the menu you see in Figure 7-41.

c07f041.tif

Figure 7-41: Defining an image file for an image object

After selecting the image, click the Fit Image and Center Image options. These force the image file to resize automatically if you alter the image object size.

Advanced Chart Types

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 what default settings to modify makes all the difference. This section reviews six of the most commonly used non-standard chart types.

Bar-in-Bar Chart

The bar-in-bar chart you see in Figure 7-42 provides another way to compare values.

In this example, color 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 color and size while altering Tableau’s default bar-stacking behavior. To build this example using the coffee chain sample dataset, follow these steps:

  1. Multi-select Market, Budget Sales, Sales.
    c07f042.tif

    Figure 7-42: Bar in bar chart

  2. Using Show Me, select the Side-by-Side Bar Chart.
  3. Move the Measure Names field pill from the Column shelf to the Size button in the Marks card.
  4. If you prefer budgeted sales to be the wider bar, drag the SUM (Budget Sales) below the SUM (Sales) pill in the Measure Values card. Alternatively, reorder the Measure Names color legend to accomplish the same thing.
  5. Go to the main menu analysis/stack mark and select the Off option.

The bar-in-bar chart has more limited use than a bullet graph, which I cover at the end of the chapter, but this chart type also packs a dense amount of information into a small space. It is particularly useful when you want to compare a small number of measures across a larger number of dimensions.

Pareto Charts

Known as the 80–20 Rule, the Pareto Principle was developed by Vilfredo Pareto in 1906 to describe the unequal distribution of wealth in his country.

In general, the (80–20) principle states that 20 percent of the inputs account for 80 percent of the outputs. For example, 80 percent of profits come from 20 percent of the products. Figure 7-43 shows a Pareto chart that displays profit by product. The following example was built using the Superstore Sales for TYD2 sample dataset. You will learn how to create a Pareto chart that plots the cumulative profit generated by each distinct product that Superstore sells.

c07f043.tif

Figure 7-43: 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 axis. In this way, the user can determine how closely the sample conforms to the Pareto Principle. In the case of Figure 7-43, you can see that the sample dataset has 80 percent of product profits being generated from a mere 5 percent of products. This is a much greater concentration than would normally be expected.

The trick to building this chart type is to understand how Table Calculations can be used to express the axis values as percentages of the total values. The steps required to build this chart are as follows:

  1. Drag the Product Name dimension to the Columns shelf.
  2. Drag the Profit measure to the Rows 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.
  5. Change the SUM (Profit) field on the Rows shelf to a two-stage Table Calculation by right-clicking the field pill and editing Quick Table Calculation, as you see in the top half (section A) of Figure 7-44.
c07f044.tif

Figure 7-44: Defining the Table Calculations

  1. Drag the Product Name field from the Dimensions shelf to the Marks card.
  2. Edit the Product Name field just placed in step 6 by right-clicking the field pill and selecting Measure ⇒ Count Distinct.
  3. Add a two-stage Table Calculation to the field editing in step 7 by right-clicking the pill and selecting Add Table Calculation. It should look like the definition in the lower half of Figure 7-44 (section B).
  4. Drag the new Table Calculation created in step 8 to the Columns 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.
  5. Change the mark type in view on the Marks card from Automatic to Bar.
  6. Create a calculated value called (Profitable?) to determine if profits are greater than zero. Use this formula: SUM(Profit)>0.
  7. Place the (Profitable?) calculated value on the Color button located on the Marks card.
  8. Add parameterized reference lines on each axis that allow the information consumer to change the location of the reference line from 0 to 100 percent in .01 increments. Refer to Figure 7-45 to view the setting used to create the vertical reference line (section A). The horizontal reference requires a second definition that should be initiated from the horizontal axis, as you see in Figure 7-45 (section B).
  9. Edit the color scheme to match the gray/orange colors that indicate profitability.

Once the parameterize reference lines are completed, the only remaining work is repositioning the screen elements to your task. The parameter controls in Figure 7-43 are positioned below the Pareto chart to better utilize the worksheet by reducing the amount of unused white space.

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 chapter on dashboards. Sparklines and bullet graphs work well in dashboards because together they convey a lot of information even when space is restricted.

c07f045.tif

Figure 7-45: Parameterized reference lines

Sparklines

Edward Tufte conceived sparklines in his wonderful book Beautiful Evidence (Graphics Press, 2006). He referred to them as “intense, simple, word-sized graphics.” Sparklines can provide very effective time series charts in dashboards. When pixel height and width are constrained, you’ll find that sparklines can convey a good deal of information in much less space than Tableau’s default time series charts. Build sparklines using the following steps:

  1. Create a standard time series chart using the Coffee Chain starter workbook.
  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 and remove the borders from the chart while adding shading on alternate rows, as you see in Figure 7-46. You access this from the format menu.
  7. 7. Hide the field labels for the rows by pointing at the heading at the top of the first column and selecting the option to hide them.
  8. If necessary, emphasize change using a table calculation. You may also need to define how Tableau should handle null values when you define the table calculation.

If you follow these steps correctly, your view should look like Figure 7-46.

c07f046.tif

Figure 7-46: Coffee chain sales sparkline

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 sparkline in combination with a bullet graph as part of an exercise in the next chapter on dashboard technique.

Bullet Graphs

Bullet graphs were developed by Stephen Few as another means for efficiently comparing metrics in a limited space. Bullet graphs are bar charts (comparing one-to-many relationships) 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-47.

c07f047.tif

Figure 7-47: Bullet graph

The bars in the bullet graph have been color-coded to reflect the result of a Boolean (true/false) calculation that evaluates Actual versus Planned Sales. Products 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 sales bars has been faded to 6 percent 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-47 included the following:

  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. Items 4 and 5 will be wrong. Right-click the bottom axis and choose the Swap Reference Line Fields.
  7. Create a Boolean calculation sum([sales]) < sum(budget 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, and so on). Tableau doesn’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, which 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 sparklines and bullet graphs in dashboards provides a very space-efficient way to compare performance to plan and performance versus prior years (if you add reference lines for that). The sparkline provides a very dense information-packed display of performance over time. Figure 7-48 shows them aligned in a dashboard.

c07f048.tif

Figure 7-48: Bullet graph and sparkline

In the next chapter, you learn about best practices for dashboard design—using a bullet graph and sparkline along with other visualizations to create a compact, information-rich dashboard design.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset