Improving the appearance to convey meaning more precisely
>>Mastering the basics of building visualizations and dashboards isn’t difficult or time-consuming. Most people achieve very good results without having to spend a lot of time learning the nuances of data visualization or mastering more advanced techniques.
>>Your dashboard and worksheet designs need to fit in the available space. For this reason, it is desirable to provide headings and instruction with as little space as possible. The technique here is to be more space –efficient without compromising about the meaning.
>>In this post, you will learn tips for changing the appearance of dates, changing colors, using filters, custom fields and creating new fields, and customizing the content and appearance of Tooltips.
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 seen in figure 7.9.
>>Tableau provides the date values in both Discrete and Continuous types. To change the date from exact date, click on the small drop down present in date field you have used in a row or column and it will display the various formats that the date can be shown. Continuous dates provide more formatting options than the discrete dates.
Figure 7.9: Customizing date formats
Formatting tooltip content
>>Tooltips are data details that are displayed when you hover over one or more marks in the view. Tooltips are also convenient for quickly filtering or removing a selection, or viewing underlying data. You can edit a tooltip to include both static and dynamic text. You can also modify and format which fields are included in the automatic tooltip.
>>Format tooltips: Tooltips are specified on a per-sheet basis and can be formatted using the tools along the top of the Edit Tooltip dialog box. You can customize tooltips by formatting each tooltip to reflect a particular field in a dimension. This is useful for highlighting differences within a specific dimension without altering the view.
>>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.
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 the charts to compare related values more easily
When using colors to express members of the 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.
Figure 7.11: Reordering the color legend
Dragging the furniture color to the bottom of the color legend as seen on the right of figure 7.11, enables more precise comparison of the furniture product category.
Exposing a header in a one-column cross tab to add meaning and save space
Adding a small crosstab in a dashboard can provide an effective means for triggering a filter action. For this reason you may want to create a very basic crosstab as you shown in figure 7.12.
The chart was created using the superstore data set. Building figure 7.12 requires two steps:
- Double-click on the region field in the dimensions shelf.
- Double-click on 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 crosstab 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 in any other field included on the measures shelf (except for the geocoding measures used for mapping) then point at the column heading of the second measure and right-click to hide the measure. Alternatively, right-click on the measure values pill (that automatically appears 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 crosstab should now look like the one in figure 7.13
Figure 7.12: One measure crosstab
Figure 7.13: Crosstab with a sales column header added
Figure 7.13 presents a very compact view of the sales by region with headers directly above the field values. This crosstab 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 crosstab is to use measure names and measure values directly to build the view by following these steps:
- Double-click on the region field on the dimensions shelf.
- Double-click on the measure names field on the dimensions shelf.
- Right-click on the measure values pill on the marks card.
- Filter-out all of the measures, leaving only the sales selected.
Subscribe to our youtube channel to get new updates..!
The key understanding in this example is, tableau will not provide a header over the measure when only one measure is in view. You will use a cross tab like this in a dashboard example, that you will build in “bringing it all together with dashboards” post.
Unpacking a packaged workbook file (.twbx)
Workbooks often reference external resources. If you want to share your workbook with someone who does not have access to the referenced resources or Tableau Server, you can save and then send them the packaged workbook instead. A packaged workbook (.twbx) contains a Tableau workbook, and it may contain one or more of the following local files:
- Background images
- Custom geocoding
- Custom shapes
- Local cube files
- Microsoft Access files
- Microsoft Excel files
- Tableau data extract files (.tde)
- Text files (.csv, .txt., etc.)
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, then right-click and select the un package option. Tableau will create a data folder that contains a copy of the file source.
Make a parameterized axis label
Using a parameter to alter the measure plotted in a view is an excellent way to make on chart which serve many purposes. But, the default axis label isn’t very informative as you see in figure 7.14.
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:
- Drag the parameter from the parameter shelf to the axis.
- Drop the parameter on the axis.
- Remove the default axis title by right clicking on the axis.
- Erase the default title in the title area.
- Right-click on the parameter heading and hide the field label.
- Rotate the parameter label by right-clicking on it and selecting rotate.
Using continuous quick filters for ranges of values
When your worksheet or dashboard contains a continuous quick filter, many people doesn’t realize that 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 the profit.
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 holding your left mouse button, drag the range to the left or right to move through the entire set in the $5,000 profit range increments
Figure 7.15: Filtering for a range of values
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 the custom dates, you can combine them into hierarchies that meet your specific needs. Figure 7.16 show a bar chart comparing sales values for specific dates.
Figure 7.16: Custom date hierarchy
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.
To create custom date hierarchies follow these simple steps:
- Point at a date field in the dimensions shelf and right-click.
- Select the create custom date option.
- Edit the date as you require.
- Drag one date field on top of another to create the custom hierarchy.
- Use the custom hierarchy in your view.
Figure 7.17 shows the custom date dialog box being accessed from the menu.
Figure 7.17: Creating a custom date
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 dimensions 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 where you might need to limit the expansion of the hierarchy so that the chart fits into the available space comfortably.
Assemble your own custom fields
This is a favorite easy formula to 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.
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 set section in chapter3 for more details.
Figure 7.18: Concatenating fields
Let tableau build your 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 on any color.
Figure 7.19: Creating a highlight action from a color legend
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 a scatter plot as you shown in figure 7.20.
Figure 7.20: Highlighting using action generated by the color and shape legends
Selecting a blue circle in the scatter plot triggers the highlight actions-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 which 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 actions definitions by going to the dashboards menu/actions, then selecting edit. Figure 7.21 displays the menu details.
Formatting table calculation results
Table calculations use your visualization to create new values. If the calculations defines results in a null value, tableau provides a variety of formatting options that allow you to control how the null results are presented in the resulting chart. Figure 7.22 shows an initial table calculation result and the five options provided to format the results.
Figure 7.21: Highlight action menu
Figure 7.22: Time series-percent change
The dialog box displayed in figure 7.22 area(1) shows the quick table calculation definition for a 3 month moving average. Note that the indicator in the dialog box (null if there are not enough values) is checked. Selecting this, tells tableau not to plot marks if there is insufficient data to calculate the results correctly. 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.
The result in the upper left section of the dashboard shows that a time series chart has been plotted with a small gray pill in the lower right corner indicating that three null values are included in the resulting plot. Notice that there are no marks for the January through march time period. This is because the data set did not include data for the preceding October through December time period.
One way to deal with the null warning is displayed in figure 7.22 area (1). Right-clicking on the 3 null pills exposes the control seen in figure 7.22 area (2), which exposes the hide indicator option. Selecting this 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.
If the (3nulls) pill is selected using the left mouse button, the dialog box seen in figure 7.22 areas (3 and 4) is displayed. Showing the data at the default position causes tableau to draw the line for the months with null values at zero. If the filter data option (4) is selected, tableau will filter the null value months from view. Notice the axis for figure 7.22 area (4) starts in April. This option might be misleading if the source data include 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 dashboards of figure 7.22 (areas 5 and 6) look similar to the to the chart in the 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 (e.g., null) formatting dialog box, right click on the field pill that you are using to express the table calculation and select format. This exposes the formatting menu for the pane as seen in figure 7.22 areas 5 and 6.
Table calculations offer many options for deriving new information from your source data tableau’s formatting options for null value provided for nuanced treatment of missing values so that information consumers are not misled by gaps in your source data.
The key to understanding quick table calculations and functions is to grasp that the visualization you’ve created provides the source data for the result. If your visualization has missing values, then your result will include missing values.
When to use floating objects in dashboards
Figure 7.23: A bad use of floating objects
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 objects doesn’t obscure the data contained in the view. Figure 7.23 is an example of a potentially sub-optimal use of floating objects.
The floating year filter and color legend in figure 7.23 are space-efficient, but could potentially obscure the data. 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. Figure 7.24 shows a good use case for floating objects.
Figure 7.24: A good use of floating objects
Presuming that sales occur only in the lower forty-eight states, the floating objects in figure 7.24 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, thus creating a more compact view than would otherwise be possible with the use of non-floating controls and quick filters.
List Of Tableau Courses: