Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Mastering Tableau
Mastering Tableau

Mastering Tableau: Smart Business Intelligence techniques to get maximum insights from your data

eBook
$29.99 $43.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Mastering Tableau

Chapter 1. Getting Up to Speed – a Review of the Basics

The goal of this book is to empower you to become a Tableau master; in Tableau-speak, the term is Jedi. Yes, that is official Tableau terminology. Attend the yearly Tableau conference and you can sit in on Jedi classes. Of course, simply attending a class will not automatically bestow you with Jedi powers - nor will simply reading this book. Diligent work on real-world problems is absolutely essential. Couple this diligent work with industrious study and you will make it. You will become a Tableau Jedi. My hope is that this book will prove useful to you on your journey to mastery.

If you are a seasoned Tableau author, you may find this initial chapter elementary. (A person who creates Tableau workbooks is referred to as an author, not a developer.) For such persons, I recommend a quick, inspectional read. If after a few minutes you are satisfied you already possess a solid understanding of the concepts discussed, feel free to proceed to subsequent chapters. If, however, you find some of the content unfamiliar, it may be wise to read with greater attention.

Those who are fairly new to Tableau should find this chapter helpful in getting up to speed quickly; however, since this book targets advanced topics, relatively little time is spent considering the basics. For a more thorough consideration of fundamental topics, consider Learning Tableau, written by Joshua Milligan and published by Packt Publishing.

In this chapter, we will discuss the following:

  • The Tableau universe
  • Understanding the Tableau interface and basic terminology
  • Worksheet and dashboard creation
  • Connecting Tableau to your data
  • Measure Names and Measure Values
  • Three essential Tableau concepts

The Tableau universe

Tableau Software has a focused vision resulting in a small product line. The main product (and hence the center of the Tableau universe) is Tableau Desktop. Assuming you are a Tableau author, that's where almost all your time will be spent when working with Tableau. But of course you must be able to connect to data and output the results. Thus, as shown in the following figure, the Tableau universe encompasses data sources, Tableau Desktop, and output channels, which include the Tableau Server family and Tableau Reader:

The Tableau universe

Data Sources

Tableau connects to many data sources. Those data sources will be discussed in more detail in the following section.

Tableau Desktop

Tableau Desktop is where visualizations are created. Although, as of Tableau 8.0, some authoring capabilities were introduced into the Tableau Server environment, that environment is limited. (See Chapter 12, Interacting with Tableau Server to learn more about authoring in the Tableau Server environment.) Thus, the heavy lifting is still done in Tableau Desktop.

Tableau Server Family

Once completed in Tableau Desktop, a workbook can be uploaded to Tableau Server for end-user access. Tableau Server provides a secure, web-based environment where end users can access visualizations created in Desktop either through a browser or via the Tableau Mobile app for Android and iPhone.

Tableau Online is a cloud-based version of Tableau Server hosted by Tableau Software. It's an ideal solution for smaller organizations that need the security and flexibility of Server without the associated overheads.

Tableau Public is, in reality, split into two products: the Tableau Public client, and a cloud-based, public-facing version of Tableau Server. The client has the capabilities of Desktop, with a few major exceptions:

  • The data sources you can connect to are very limited (for example, Excel, Access, text file formats and web data connectors)
  • You can only publish to Tableau Public
  • You are limited to 15 million rows of data per workbook

Tableau Reader

The relationship between Tableau Desktop and Tableau Reader is synonymous to that between Adobe Acrobat and Adobe Reader. Desktop is used for authoring; Reader is used for viewing. Desktop has an associated cost; Reader is free.

A few brief notes regarding Reader:

  • Filters, dashboard actions, animation and parameters are all accessible on Reader, but no authoring is enabled
  • Reader is useful for presentations when Desktop is not available
  • Reader can only be used with packaged workbooks that do not contain live connections to other data sources

Understanding the Tableau interface and basic terminology

To begin our survey of the basics, let's consider the terminology and associated definitions of assets that make up the Tableau workspace. Lingering a little on these terms should prove helpful, since each is used throughout the book:

Understanding the Tableau interface and basic terminology

Go to Start

Click to toggle between the start page and the workspace.

Data Pane

Provides access to the data source, all fields, sets, and parameters, and displays the underlying data when the View Data icon is clicked.

Data Source

Lists all data sources and provides access to edit data sources, create data extracts, publish data sources, and more.

Dimensions

Lists all fields classified as Dimensions.

Measures

Lists all fields classified as Measures.

Sets

Lists all sets created by the Tableau author.

Parameters

Lists all parameters created by the Tableau author.

Data Source Tab

Provides access to the Data Source page.

Shelves

Areas where fields are placed to create views.

Legend

Serves the dual purpose of communicating Color, Size, and Shape information that exists in the view, as well as providing sorting, filtering, and highlighting capabilities.

Status Bar

Displays information about the current view.

Fit

Determines how a view is sized on the screen.

View

That which the end user sees via Tableau Server or Reader. Includes the visualization, legends, displayed filters, parameters, captions, and so on.

Pills

Fields, sets, or parameters that have been placed on one or more shelves. So named because the shape resembles a pill.

Show Me

Tool used to automatically create visualizations based on selected fields and any fields already placed on shelves.

Displayed Filter

A field exposed to the end user providing the ability to display/hide a numeric or date range of the field or display/hide members of the field. In earlier versions of Tableau this was referred to as a Quick Filter.

Worksheet and dashboard creation

At the heart of Tableau are worksheets and dashboards. Worksheets contain individual visualizations and dashboards contain one or more worksheets. Additionally, worksheets and dashboards may be combined into stories to communicate specific insights to the end user via a presentation environment. Lastly, all worksheets, dashboards, and stories are organized in workbooks that can be accessed via Tableau Desktop, Server, or Reader. In this section, we will look at worksheet and dashboard creation with the intent of not only communicating the basics, but also providing some insight that may prove helpful to even more seasoned Tableau authors.

Worksheet creation

At the most fundamental level, a visualization in Tableau is created by placing one or more fields on one or more shelves. To state this as a pseudo-equation:

Field(s) + shelf(s) = Viz

As an example, note that the visualization created in the following screenshot is generated by placing the Sales field on the Text shelf. Although the results are quite simple - a single number - this does qualify as a view. In other words, a Field (Sales) placed on a shelf (Text) has generated a Viz:

Worksheet creation

Exercise - fundamentals of visualizations

Let's explore the basics of creating a visualization via an exercise:

  1. Navigate to https://public.tableau.com/profile/david.baldwin#!/ to locate and download the workbook associated with this chapter.
  2. In the workbook, find the tab labeled Fundamentals of Visualizations:

    Exercise - fundamentals of visualizations

  3. Locate Region within the Dimensions portion of the Data pane:

    Exercise - fundamentals of visualizations

  4. Drag Region to the Color shelf; that is, Region + Color shelf = what is shown in the following screenshot:

    Exercise - fundamentals of visualizations

  5. Click on the Color shelf and then on Edit Colors... to adjust colors as desired:

    Exercise - fundamentals of visualizations

  6. Next, move Region to the Size, Label/Text, Detail, Columns, and Rows shelves. After placing Region on each shelf, click on the shelf to access additional options.
  7. Lastly, choose other fields to drop on various shelves to continue exploring Tableau's behavior.

As you continue exploring Tableau's behavior by dragging and dropping different fields onto different shelves, you will notice that Tableau responds with default behaviors. These defaults, however, can be overridden, which we will explore in the following section.

Beyond default behavior

Note that in the previous exercise, the Marks card perpetually reads Automatic. This means that Tableau is providing the default view. The default view can be easily overridden by choosing a different selection from the drop-down menu:

Beyond default behavior

Another type of default behavior can be observed when dragging a field onto a shelf. For example, dragging and dropping a measure onto a shelf will typically result in the aggregation Sum. To override this default behavior, right click and drag a field from the Data pane and drop it onto a shelf. Tableau will respond by opening a dialog box with the possible options. An example of this is shown in the following screenshot, where the field Region has been placed on the Rows shelf via a right-click, drag and drop action:

Beyond default behavior

Exercise - overriding defaults

Let's walk through an exercise overriding the two default behaviors discussed previously:

  1. In the workbook associated with this chapter, navigate to the Overriding Defaults worksheet, right-click and drag Order Date to the Columns shelf.
  2. Within the resulting dialog box, choose the second instance of MONTH(Order Date):

    Exercise - overriding defaults

  3. Place Sales on the Rows shelf and Region on the Details shelf.
  4. Click on the dropdown in the Marks card and select Area:

    Exercise - overriding defaults

Show Me

Show Me allows the Tableau author to create visualizations at the click of a button. To understand how it works, consider the following screenshot:

Show Me

  1. A: Selected field(s) in the Data pane.
  2. B: Field(s) deployed in the view; that is, Pills.
  3. C: The recommended view.
  4. D: Help text communicating the requirements for creating the recommended view for any selection choice over which the cursor is placed.
  5. Every icon in Show Me that is not grayed out represents a visualization that can be created simply by clicking on it. For example, in the preceding screenshot, the Tableau author may choose to click on the pie chart icon to create a pie chart based on the selected and deployed fields.

    Note

    Show Me options are highlighted based on two criteria: the selected field(s) in the Data pane and the fields(s) deployed in the view.

  6. Show Me may be effectively used for the following reasons:
    • Efficiency: The proficient Tableau author already knows how to create the basic visualization types. Show Me automates these basic types and thus may be used for quicker production.
    • Inspiration: Determining an effective way to visualize a dataset can be challenging. Show Me can help with this challenge by allowing the Tableau author to quickly consider various options.
    • Education: An inexperienced Tableau author may access Show Me to better understand how various visualizations are created. Much can be learned by reading the help text displayed at the bottom of Show Me and observing the results generated by clicking on various options.
  7. These three reasons communicate the strong value that Show Me provides for worksheet creation; however, there is one reason for which it should not be used: as a crutch. The Tableau author who clicks on the various options without understanding how each visualization is created is not only shortchanging the educational process, but may generate results that are not well understood and could thus lead to detrimental business decisions.

Dashboard creation

Although, as stated previously, a dashboard contains one or more worksheets, dashboards are much more than static presentations. They are an essential part of Tableau's interactivity. In this section, we will populate a dashboard with worksheets and then deploy actions for interactivity.

Exercise - building a dashboard

  1. In the workbook associated with this chapter, navigate to the tab entitled Building a Dashboard.
  2. Within the Dashboard pane located on the left-hand portion of the screen, double-click on each of the following worksheets (in the order in which they are listed) to add them to the dashboard:
    • US Sales
    • Customer Segment
    • Scatter Plot
    • Customers

  3. In the lower right-hand corner of the dashboard, click in the blank area below Profit Ratio to select the vertical container:
    • After clicking in the blank area, you should see a blue border around the filter and the legends. This indicates that the vertical container is selected.

  4. As shown in the following screenshot, select the vertical container handle and drag it to the left-hand side of the Customers worksheet. Note the gray shading, which communicates where the container will be placed:

    Exercise - building a dashboard

    Tip

    The gray shading (provided by Tableau when dragging elements such as worksheets and containers onto a dashboard) helpfully communicates where the element will be placed. Take your time and observe carefully when placing an element on a dashboard or the results may be unexpected.

  5. Format the dashboard as desired. The following tips may prove helpful:
    1.  Adjust the sizes of the elements on the screen by hovering over the edges between each element and then clicking and dragging as desired.
    2. Note that the Sales and Profit legends in the following screenshot are floating elements. Make an element float by right-clicking on the element handle and selecting Floating. (See the previous screenshot and note that the handle is located immediately above Region, in the upper-right-hand corner).
    3. Create Horizontal and Vertical containers by dragging those objects from the bottom portion of the Dashboard pane.
    4. Drag the edges of containers to adjust the size of each worksheet.
    5. Display the dashboard title via Dashboard | Show Title...:

      Exercise - building a dashboard

Exercise - adding interactivity to a dashboard

One of the primary benefits of Tableau is the interactivity it provides the end user. Dashboards are not simply for viewing; they are meant for interaction. In this exercise, we will add interactivity to the dashboard that was created in the previous exercise:

  1. Starting where the previous exercise ended, click the drop-down menu associated with the Region filter and navigate to Apply to Worksheets | All Using this Data Source:

    Exercise - adding interactivity to a dashboard

  2. In order to use the map as a filter for the other worksheets on the dashboard, click the Use as Filter icon located in the top-right-hand corner of the US Sales worksheet:

    Exercise - adding interactivity to a dashboard

  3. Similarly, set Customer Segment to Use as Filter.
  4. Navigate to the menu option Dashboard | Actions.
  5. Within the dialog box, navigate to Add Action | Filter and create a filter like the one shown in the following screenshot:

    Exercise - adding interactivity to a dashboard

Having completed the preceding dashboard exercise, you should now be able to click on various objects on the dashboard and observe their interactivity. To learn advanced dashboarding techniques, be sure to check out Chapter 10Visualization Best Practices and Dashboard Design.

Connecting Tableau to your data

At the time of writing, Tableau's Data Connection menu includes 50 different connection types, and that is somewhat of an understatement since some of those types contain multiple options. For example, the selection choice, Other Files, includes 21 options. Of course, we won't cover the details for every connection type, but we will cover the basics.

Upon opening a new instance of Tableau Desktop, you will note a link in the upper left-hand corner of the workspace. Clicking on that link will enable you to connect to data. Alternatively, you can simply click on the New Data Source icon on the toolbar:

Connecting Tableau to your data

Although subsequent chapters will consider connecting to other data sources, here we will limit the discussion to considerations when connecting to Excel and text files.

Excel and text files

Upon choosing to connect to an Excel or text file, the Tableau author is presented with two choices. Note that those choices are somewhat hidden. As shown in the following screenshot, you will need to click on the arrow next to the Open button to access them:

Excel and text files

The Open option uses a native Tableau driver. The Open with Legacy Connection option accesses the Microsoft JET driver. Let's compare and contrast some of the differences between these two drivers.

Comparing and contrasting Native Tableau Driver and MS Jet Driver

Native Tableau Driver

MS Jet Driver

More set capabilities such as in/out and combined sets

Limited set capabilities

Count Distinct is allowed

Count Distinct is disallowed

Allows more than 255 columns

Columns are capped at 255

Special characters, such as brackets and quotation marks, are allowed in file and field names

Special characters are disallowed in file and field names

When connecting to Excel, the data type is determined by 95% of the first 10,000 rows

When connecting to Excel, the data type is determined by the first eight rows

Cannot connect to .xlsb files

Can connect to .xlsb files

File names can be any length

File names are limited to 64 characters

Custom SQL is not allowed

Custom SQL is allowed

Left and inner joins are allowed

Left, inner, and right joins are allowed

Pivot data from rows to columns

No pivoting feature

Improved header auto-detection

Note that the preceding table is not complete. There are many other differences between the functionality of Native Tableau Driver and MS Jet Driver. Most of those, however, are less consequential.

So, when should you use Native Tableau Driver versus MS JET Driver? In short, use the native Tableau driver! In almost every case it will provide better performance and more functionality. One exception is when custom SQL is required. Tableau Software does not recommend using custom SQL in most cases because Tableau-generated SQL will run more efficiently; however, in some cases it may be necessary.

Connecting to a Tableau Server

Connecting to Tableau Server is perhaps the single most important server connection type to consider, since it is frequently used to provide better performance than may otherwise be possible. Additionally, connecting to Tableau Server enables the author to receive not only data, but information regarding how that data is to be interpreted, for example, whether a given field should be considered a measure or a dimension. Let's explore this further via two exercises.

Exercise - observing metadata differences

As a precursor to connecting to Tableau Server, let's compare and contrast the instance of the Superstore data source represented in the workbook associated with this chapter (that is, the Chapter 1 workbook) with a new connection to the same data.

Exercise steps

  1. In a new instance of Tableau, navigate to Data | New Data Source | Excel to connect to the Sample - Superstore dataset that installs with Tableau desktop (it should be located on your hard drive under My Tableau Repository | Datasources).
  2. Double-click on the Orders sheet.
  3. Click on the Sheet 1 tab.
  4. Place Discount on the Text shelf.
  5. Double-click on Profit and Sales.
  6. Compare the results of the new worksheet to that of the worksheet entitled Observing Metadata Differences in the Chapter 1 workbook:

    Exercise steps

  • A: The data source name has been altered in the Chapter 1 workbook
  • B: In the Chapter 1 workbook, the default aggregation of Discount is AVG. In the unaltered instance the default is SUM
  • C: Product Hierarchy exists only in the Chapter 1 workbook
  • D: The format of Discount, Profit, and Sales differs between the two instances
  • E: Profit Ratio exists only in the Chapter 1 workbook

Exercise - connecting to Tableau Server

In order to complete this exercise, access to an instance of Tableau Server is necessary. If you do not have access to Tableau Server, consider installing a trial version on your local computer:

  1. In the workbook associated with this chapter, navigate to the Connecting to Tableau Server worksheet.
  2. Right-click on the Superstore data source and select Publish to Server.
  3. Log in to Tableau Server and follow the prompts to complete the publication of the data source.
  4. After the data source has been published, open a new instance of Tableau Desktop and navigate to Data | New Data Source | Tableau Server to connect to the data source published in the previous step.
  5. Click on Sheet 1 in the new workbook and observe that the changes made in the Chapter 1 workbook have been preserved.
  6. Within the Data pane, right-click on Profit Ratio and note that it is not directly editable.

Having completed the previous two exercises, let's discuss the most germane point; that is, metadata. Metadata is often defined as data about the data. In the preceding case, the data source name, default aggregation, default number formatting, and hierarchy are all examples of Tableau remembering changes made to the metadata. This is important because publishing a data connection allows for consistency across multiple Tableau authors. For example, if your company has a policy regarding the use of decimal points when displaying currency, that policy will be easily adhered to if all Tableau authors start building workbooks by pointing to data sources where all formatting has been predefined.

In the last exercise, the fact that the Profit Ratio calculated field was not directly editable when accessed via connecting to Tableau Server as a data source has important implications. Imagine the problems that would ensue if different Tableau authors defined Profit Ratio differently. End users would have no way of understanding what Profit Ratio truly means. However, by creating a workbook based on a published data source, the issue is alleviated. One version of Profit Ratio is defined and it can only be altered by changing the data source. This functionality can greatly improve consistency across the enterprise.

Connecting to saved data sources

Connecting to a saved data source on a local machine is much like connecting to a data source published on Tableau Server. Metadata definitions associated with the local data source are preserved, just like they are on Tableau Server. Of course, since the data source is local instead of remote, the publication process is different. Let's explore this via an exercise.

Exercise - creating a local data connection

  1. In the workbook associated with this chapter, navigate to the tab entitled Local Data Connection.
  2. In the Data pane, right-click on the Superstore data source and select Add to Saved Data Sources.
  3. Using the resulting dialog box, save the data source as Superstore in My Tableau Repository | Datasources, located on your hard drive.
  4. Click on the Go to Start icon located in the top-left corner of your screen and observe the new saved data source:

    Exercise - creating a local data connection

Tip

Note that you can save a local data source that points to a published data source on Tableau Server. First, connect to a published data source on Tableau Server. Next, right-click on the data source in your workspace and choose Add to Saved Data Sources. Now you can connect to Tableau Server directly from your Start page!

Measure Names and Measure Values

I've observed the following scenario frequently. A new Tableau author creates a worksheet and drags a measure to the Text shelf. They would like to create another row to display a second measure but do not know how. They drag the second measure to various places on the view and get results that seem entirely unpredictable. The experience is very frustrating for the author, since it's so easy to accomplish this in Excel! The good news is that it's also easy to accomplish in Tableau. It just requires a different approach. Let's explore the solution via an exercise.

Measure Names and Measure Values - the basics

Measure Names and Measure Values are generated fields in Tableau. They do not exist in the underlying data, but they are indispensable for creating many kinds of views. As may be guessed from its placement in the Data pane and its name, Measure Names is a dimension whose members are made up of the names of each measure in the underlying dataset. Measure Values contains the numbers or values of each measure in the dataset. Watch what happens below when measure names and measure values are used independently. Afterward observe how they work elegantly together to create a view.

Exercise - Measure Names and Measure Values

  1. In the workbook associated with this chapter, navigate to the worksheet entitled Measure Names/Values.
  2. Drag Measure Values to the Text shelf and observe the results:

    Exercise - Measure Names and Measure Values

  3. Clear the worksheet by clicking on the Clear Sheet icon on the toolbar:

    Exercise - Measure Names and Measure Values

  4. Drag Measure Names to the Rows shelf and observe that the view merely displays No Measure Value.
  5. Drag Measure Values to the Text shelf. Note the list of measures and associated values.

Perhaps the interrelationship between Measure Names and Measure Values is best explained by an analogy. Consider several pairs of socks and a partitioned sock drawer. Step 2 is the equivalent of throwing the socks into a pile. The results are, well, disorganized. Step 4 is the equivalent of an empty sock drawer with partitions. The partitions are all in place but where are the socks? Step 5 is a partitioned drawer full of nicely organized socks. Measure Names is like the partitioned sock drawer. Measure Values is like the socks. Independent of one another they are not of much use. Used together, they can be applied in many different ways.

Measure Names and Measure Values - shortcuts

Tableau provides various shortcuts to quickly create a desired visualization. If you are new to the software, this shortcut behavior may not seem intuitive, but with a little practice and a few pointers, you will quickly gain understanding. Let's use the following exercise to explore how you can use a shortcut to rapidly deploy Measure Names and Measure Values.

Exercise - Measure Names and Measure Values shortcuts

  1. In the workbook associated with this chapter, navigate to the worksheet entitled MeasureNames/Values ShrtCts.
  2. Drag Sales directly on top of the Profit number in the view:

    Exercise - Measure Names and Measure Values shortcuts

  3. Observe the results, including the appearance of the Measure Values shelf, the deployment of Measure Names on the Rows and Filters shelves, and Measure Values on the Text shelf:

Exercise - Measure Names and Measure Values shortcuts

Exercise commentary

Several things happened in step 2. After placing Sales on top of the Profit number in the view, Tableau did the following:

  1. Deployed Measure Names on the Filters shelf:
    • Open the Measure Names filter and observe that only Profit and Sales are selected. This limits the view to display only those two measures.

  2. Deployed Measure Names on the Rows shelf:
    • Measure Names is acting like a partitioned container; that is, like the sock drawer in the preceding analogy. Because of the filter, the only rows that are displayed are for Profit and Sales.

  3. Displayed the Measure Values shelf:
    • The Measure Values shelf is somewhat redundant. Although it clearly shows the measures that are displayed in the view, it essentially acts as an easy way to access the filter. You can simply drag measures on and off the Measure Values shelf to adjust the filter and thus display/hide additional Measure Values. You can also change the order within the Measure Values shelf to change the order of the measures in the view.

  4. Deployed Measure Values on the Text shelf:
    • Measure Values simply defines the numbers that will be displayed for each row - in this case, the numbers associated with Profit and Sales.

If the visualization has an axis, the shortcut to deploy Measure Names and Measure Values requires the placement of a second measure on top of the axis of an initial measure, as shown in the following screenshot:

Exercise commentary

Three essential Tableau concepts

The road to the mastery of Tableau begins with three essential concepts. We will consider each of the following in turn:

  • Dimensions and measures
  • Row level, aggregate level, and table level
  • Continuous and discrete

Essential concept 1 - dimensions and measures

Tableau categorizes every field from an underlying data source as either a dimension or a measure. A dimension is qualitative or, to use another word, categorical. A measure is quantitative or aggregable. A measure is usually a number but may be an aggregated, non-numeric field, such as MAX(Order Date). A dimension is usually a text, Boolean, or date field, but may also be a number, such as Order_ID. Dimensions provide meaning to numbers by slicing those numbers into separate parts/categories. Measures without dimensions are mostly meaningless.

Let's consider an example to better understand this concept.

Exercise - dimensions and measures

  1. In the workbook associated with this chapter, navigate to the worksheet entitled Dimensions and Measures.
  2. Drag Sales to the Rows shelf.
  3. Place Order Date and Category on the Columns shelf:

    Exercise - dimensions and measures

The result of step 2 is mostly meaningless. The measure Sales is about $2.3 million, but without the context supplied by slicing the measure with one or more dimensions, there is no way to understand what it means. Step 2 brings meaning. Placing Order Date and Category on the Columns shelf provides context, which imparts meaning to the visualization.

Essential concept 2 - Row Level, Aggregate Level, and Table Level

There are three levels of calculations in Tableau: Row, Aggregate, and Table. To understand how these three levels function, it is important to be familiar with the Tableau process flow:

Essential concept 2 - Row Level, Aggregate Level, and Table Level

Let's follow the flow of the preceding figure to understand where the three levels of calculations take place. We will do so via an example considering the fields Profit and Sales. Assuming SQL, consider the following calculation types, calculated fields, and queries. Note that the SQL is simplified for the sake of the example:

Calculation type

Calculated field in Tableau

Query passed to Data Source

Row level

Profit/Sales

SELECT SUM(Profit / Sales)

FROM Orders$

Aggregate level

Sum(Profit)/Sum(Sales)

SELECT SUM(Profit),

SUM(Sales)

FROM Orders$

Table level

WINDOW_AVG(Sum([Number of Records])/Sum(Quantity))

SELECT SUM(Profit),

SUM(Sales)

FROM Orders$

For the row-level calculation, the computation is actually completed by the data-source engine. Tableau merely displays the results. For the aggregate level calculation, Tableau does a little bit more than display the results; it also divides the two numbers that are returned by the data-source engine. For the table-level calculation, Tableau may perform additional computations on the returned results. Let's explore further via an exercise using the similar calculated fields.

Exercise - Row Level, Aggregate Level, and Table Level

  1. In the workbook associated with this chapter, navigate to the worksheet entitled Row_Agg_Tbl.
  2. Navigate to Analysis | Create Calculated Field to create the following calculated fields. Note that each must be created separately; it is not possible in this context to create a single calculated field containing all three calculations:

    Name

    Calculation

    Lev - Row

    [Number of Records]/[Quantity]

    Lev - Agg

    SUM([Number of Records])/SUM(Quantity)

    Lev - Tab

    WINDOW_AVG([Lev - Agg])

  3. In the Data pane, right-click on the three calculated fields you just created and navigate to Default Properties | Number format.
  4. In the resulting dialog box, select Percentage and click OK.
  5. Place Order Date on the Columns shelf.
  6. Place Measure Names on the Rows shelf and Measure Values on the Text shelf.
  7. Exclude all values except for Lev - Row, Lev - Agg, and Lev - Tab:

    Exercise - Row Level, Aggregate Level, and Table Level

Exercise commentary

Lev - Agg is an aggregate-level calculation. The aggregated results of [Number of Records] and [Quantity] are returned by the data-source engine. Tableau divides those results and displays values for each year.

Lev - Row is a row-level calculation. The computation is completed by the data-source engine. [Number of Records] is divided by [Quantity] for each row of the underlying data. The results are then summed across all rows. Of course, in this case, the row-level calculation does not provide useful results; however, since a new Tableau author may mistakenly create a row-level calculation when an aggregate-level calculation is what is really needed, the example is included here.

Lev - Tab is a table-level calculation. Some of the computation is completed by the data-source engine; that is, the aggregation. Tableau completes additional computation on the results returned from the data-source engine. Specifically, the results of Lev - Agg are summed and then divided by the number of members in the dimension. For the preceding example, this is (26.29% + 26.34% + 26.30% + 26.55%)/4. Once again, the results in this case are not particularly helpful, but they do demonstrate knowledge the budding Tableau author should possess.

Essential concept 3 - continuous and discrete

Continuous and discrete are not concepts that are unique to Tableau. Indeed, both can be observed in many arenas. Consider the following example:

Essential concept 3 - continuous and discrete

This is an image of two rivers - River-Left and River-Right. Water is flowing in River-Left. River-Right is composed of ice cubes. Could you theoretically sort the ice cubes in River-Right? Yes! Is there any way to sort the water in River-Left? In other words, could you take buckets of water from the bottom of the river, cart those buckets upstream and pour the water back into River-Left and thereby say, I have sorted the water in the river? No. The H2O in River-Left is in continuous form; that is, water. The H2O in River-Right is in discrete form; that is, ice.

Having considered an example of continuous and discrete in natural phenomena, let's turn our attention back to Tableau. Continuous and discrete in Tableau can be more clearly understood via the following seven considerations:

  1. Continuous is green. Discrete is blue. Select any field in the Data pane or place any field on a shelf and you will note that it is either green or blue. Also, the icons associated with fields are either green or blue.
  2. Continuous is always numeric. Discrete may be a string.
  3. Continuous and discrete are not synonymous with dimension and measure. It is common for new Tableau authors to confuse continuous with measure and discrete with dimension. They are not synonymous. A measure may be either discrete or continuous. Also, a dimension, if it is a number, may be discrete or continuous. To prove the point, right-click on any numeric or date field in Tableau and note that you can convert it:

    Essential concept 3 - continuous and discrete

  4. Discrete is sortable. Continuous is not sortable. Sortable/not sortable behavior is most easily observed with dates, as shown in the following screenshot:

    Essential concept 3 - continuous and discrete

  5. Continuous colors are gradients. Discrete colors are distinct. The following example shows Profit as continuous and then as discrete. Note the difference in how colors are rendered. The left portion of the following screenshot demonstrates that continuous results in gradients and the right portion demonstrates that discrete results in distinct colors:

    Essential concept 3 - continuous and discrete

  6. Continuous pills can be placed to the right of discrete pills, but not to the left. In the following screenshot, note that the Tableau author can place Region to the right of Year when Year is discrete. Further note that the Tableau author is unable to place Region to the right of Year when Year is continuous:

    Essential concept 3 - continuous and discrete

  7. Continuous creates axes. Discrete creates headers. Note that in the left portion of the following screenshot, Year(Order Date) is continuous and the Year of Order Date axis is selected. Since Year of Order Date is an axis, the entire x-plane is selected. In the right portion of the screenshot, Year(Order Date) is discrete and 2014 is selected. Since 2014 is a header, only it is selected and not the entire x-plane:

Essential concept 3 - continuous and discrete

Summary

In this chapter, we looked at the basics of Tableau. We began our survey by considering the Tableau universe, as well as the Tableau interface and some basic terminology. This is important, since definitions given here will be used throughout the book and are prevalent in any discussion concerning Tableau.

Next we considered the basics of creating worksheets and dashboards. We focused on default behavior and how to override that behavior, and we also considered best practices, particularly with regard to the prudent use of Show Me.

Next we reviewed Measure Names and Measure Values. Note that this is often an area where new Tableau authors stumble. If you struggle with proper utilization of Measure Names and Values, consider repeating the exercises and constructing some of your own to ensure clear comprehension.

Finally, we considered three essential Tableau concepts: dimensions and measures; row, aggregate, and table levels; and continuous and discrete. Of particular importance is the understanding that row- and aggregate-level calculations are computed by the data-source engine, while table-level calculations are handled by Tableau. Also, a clear understanding of the seven considerations regarding continuous and discrete should prove helpful.

We will continue our exploration of Tableau with a series of chapters that are all about the data. In these chapters, we will consider how to prepare your data for Tableau; joins, blends, and data structures; and data densification, cubes, and big data.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • • Arm yourself with an arsenal of advanced chart types and geocoding to efficiently and engagingly present information
  • • Map a grid over a network node diagram and use that grid to demonstrate loads, processing time, and more in Tableau
  • • Integrate R with Tableau by utilizing R functions, libraries, and saved models

Description

Tableau has emerged as one of the most popular Business Intelligence solutions in recent times, thanks to its powerful and interactive data visualization capabilities. This book will empower you to become a master in Tableau by exploiting the many new features introduced in Tableau 10.0. You will embark on this exciting journey by getting to know the valuable methods of utilizing advanced calculations to solve complex problems. These techniques include creative use of different types of calculations such as row-level, aggregate-level, and more. You will discover how almost any data visualization challenge can be met in Tableau by getting a proper understanding of the tool’s inner workings and creatively exploring possibilities. You’ll be armed with an arsenal of advanced chart types and techniques to enable you to efficiently and engagingly present information to a variety of audiences through the use of clear, efficient, and engaging dashboards. Explanations and examples of efficient and inefficient visualization techniques, well-designed and poorly designed dashboards, and compromise options when Tableau consumers will not embrace data visualization will build on your understanding of Tableau and how to use it efficiently. By the end of the book, you will be equipped with all the information you need to create effective dashboards and data visualization solutions using Tableau.

Who is this book for?

If you are a business analyst without developer-level programming skills, then this book is for you. You are expected to have at least a fundamental understanding of Tableau and basic knowledge of joins, however SQL knowledge is not assumed. You should have basic computer skills, including at least moderate Excel proficiency.

What you will learn

  • • Create a worksheet that can display the current balance for any given period in time
  • • Recreate a star schema from in a data warehouse in Tableau
  • • Combine level of detail calculations with table calculations, sets, and parameters
  • • Create custom polygons to build filled maps for area codes in the USA
  • • Visualize data using a set of analytical and advanced charting techniques
  • • Know when to use Tableau instead of PowerPoint
  • • Build a dashboard and export it to PowerPoint
Estimated delivery fee Deliver to Chile

Standard delivery 10 - 13 business days

$19.95

Premium delivery 3 - 6 business days

$40.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 06, 2016
Length: 476 pages
Edition : 1st
Language : English
ISBN-13 : 9781784397692
Vendor :
Tableau
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Estimated delivery fee Deliver to Chile

Standard delivery 10 - 13 business days

$19.95

Premium delivery 3 - 6 business days

$40.95
(Includes tracking information)

Product Details

Publication date : Dec 06, 2016
Length: 476 pages
Edition : 1st
Language : English
ISBN-13 : 9781784397692
Vendor :
Tableau
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 170.97
Learning Tableau 10
$60.99
Tableau 10 Business Intelligence Cookbook
$54.99
Mastering Tableau
$54.99
Total $ 170.97 Stars icon

Table of Contents

13 Chapters
1. Getting Up to Speed – a Review of the Basics Chevron down icon Chevron up icon
2. All about Data – Getting Your Data Ready Chevron down icon Chevron up icon
3. All about Data – Joins, Blends, and Data Structures Chevron down icon Chevron up icon
4. All about Data – Data Densification, Cubes, and Big Data Chevron down icon Chevron up icon
5. Table Calculations Chevron down icon Chevron up icon
6. Level of Detail Calculations Chevron down icon Chevron up icon
7. Beyond the Basic Chart Types Chevron down icon Chevron up icon
8. Mapping Chevron down icon Chevron up icon
9. Tableau for Presentations Chevron down icon Chevron up icon
10. Visualization Best Practices and Dashboard Design Chevron down icon Chevron up icon
11. Improving Performance Chevron down icon Chevron up icon
12. Interacting with Tableau Server Chevron down icon Chevron up icon
13. R Integration Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4
(10 Ratings)
5 star 70%
4 star 10%
3 star 10%
2 star 10%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




j v Apr 27, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good
Amazon Verified review Amazon
Raghu Apr 15, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
It’s easy to practice and have various examples to understand the basics in tableau. This book has helped professionally. I will advice this book
Amazon Verified review Amazon
Don88 Jan 20, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is very well-planned, well-researched, well-designed, well-written, and well-edited with extremely thorough presentation. I've purchased 5 different books on Tableau. However, I've learned more from this book than I ever did in all the other books combined. The problem I've had with most books dealing with Tableau is, there are no hands-on exercises and the examples provided in those books are essentially trivial for practical purposes. Not so with “Mastering Tableau”, there are online support files and example codes you can download for the hands-on exercises which are well written and thoroughly explained. This is indisputably the best Tableau book that I have ever come across.This is a must have book for Tableau users - whether you are new to Tableau or more advanced. The novice will feel like less than a novice by the first five chapters. Those who are more advanced can use this book as a great reference (it helps refresh forgotten knowledge). The material is arranged with the most elegant and simple descriptions of complex concepts unfolding into sophisticated working prototypes. Chapter by chapter, the introduction to the reader of “Mastering Tableau” and other intricacies within the object model builds understanding of fundamentals and delivers where most books fail - without extraneous and misleading detail. I highly recommend this book.
Amazon Verified review Amazon
Eric Sep 12, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Easy to read, I use it as my reference book in my office.
Amazon Verified review Amazon
gennaro coppa Jul 03, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
lots of good info
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela