Learning Tableau

4.8 (4 reviews total)
By Joshua N . Milligan
    Advance your knowledge in tech with a Packt subscription

  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Creating Your First Visualizations and Dashboard

About this book

In the professional world, turning massive amounts of data into something that can be seen and understood is vitally important. This is where Tableau steps in. It has emerged as a clear leader in data visualization because it translates your actions into a database query and expresses the response graphically.

It also has the unique ability to do ad hoc analysis of millions of rows of data in just a matter of seconds with Tableau's Data Engine. Tableau is a rare software platform that is intuitive and even fun to use, which also enables you to dive deep into answering complex questions about your data.

Starting with creating your first dashboard in Tableau 9.0, this book will let you in on some useful tips and tricks, teach you to tell data stories using dashboards, and teach you how to share these data stories. Practical examples along with detailed explanations of how and why various techniques work will help you learn Tableau quickly - and master its advanced functions too.

Publication date:
April 2015


Chapter 1. Creating Your First Visualizations and Dashboard

Tableau is an amazing data visualization platform! With it, you will be able to achieve incredible data discovery, data analysis, and data storytelling. You will accomplish all of these tasks and goals visually. In fact, Tableau is unique among all other data visualization tools because it uses VizQL, a visual query language. This means you won't write a lot of tedious SQL or MDX or painstakingly work through wizards to select a chart type and then link components together with data.

Instead, you will be interacting with the data in a visual environment and Tableau will automatically translate your actions into the necessary queries behind the scenes. Much of your work will be drag and drop. Tableau empowers you to work with data rapidly and iteratively, switch visualization types on-the-fly, and ask new questions and gain new insight.

This chapter introduces the foundational principals of data visualization in Tableau. You will take on the role of an analyst for a coffee chain. We'll work through a series of examples that will introduce the basics of connecting to data, exploring and analyzing the data visually, and finally, putting it all together in a fully interactive dashboard. These concepts will be developed far more extensively in subsequent chapters. This chapter lays the foundation, including:

  • Connecting to data in Access

  • Creating bar charts

  • Creating line charts

  • Creating geographic visualizations

  • Using Show Me

  • Putting everything together in a dashboard


Connecting to data in Access

Tableau connects to data stored in a wide variety of files and databases. This includes flat files such as Excel and text files, relational databases such as SQL Server and Oracle, cloud-based data sources such as Google Analytics and Amazon Redshift, and OLAP data sources such as Microsoft SQL Server Analysis Services. With very few exceptions, the process of building visualizations and performing analysis will be the same no matter what data source you use. We'll cover the details of connecting to different data sources in later chapters.

For now, we will connect to an Access data source included in the resources supplied with this book. This chapter's workbook includes a connection to the data source, but we will walk through the steps of connecting using a new workbook first:

  1. Open Tableau. The home screen should appear. If you are not on the home screen, then from the menu, navigate to Data | New Data Source.

  2. Under Connect in the To a file section, click on Microsoft Access.

  3. Click on Browse… and navigate to the Learning Tableau\Data directory and open Coffee Chain.mdb.

  4. The database does not contain any security, so you do not need to adjust either the Database Password or Workgroup Security options. Click on OK to connect.

  5. Tableau's data connection screen allows you to visually create connections to data sources. We'll look at the details of this screen in the next chapter. For now, drag the CoffeeChain Query table, located on the left-hand side under Table, into the center of the screen. This query contains all the fields we'll need in order to build our initial visualizations and the dashboard. The query functions look like a single table in the Tableau connection.

  6. Once you have configured a data connection, you can create visualizations and dashboards by clicking on a tab at the bottom. Click on the Sheet 1 tab in the lower-left corner.

  7. If the Show Me panel is displayed in the upper-right corner, collapse it by clicking at the top of the panel where the Show Me text appears.

You should now be in the main work area of Tableau, which looks like this:

Locate the numbered features of the main workspace. We'll refer to these features throughout the book, so familiarize yourself with the terminology:

  • 1: The menu allows you to perform a wide variety of functions.

  • 2: The toolbar makes common functions, such as undo, redo, save, connect to data, and so on, easily available.

  • 3: The sidebar appears on the left-hand side and contains different features and controls based on your current task (for example, data visualization, applying analytics, formatting, or designing dashboards). The default sidebar in the main workspace consists of two tabs allowing you easy access to data and analytics. The Data window consists of data source connection(s), and the fields contained in the data sources are divided into Dimensions and Measures.

  • 4: You can drag and drop data fields from the Data window onto various shelves, such as Pages, Filters, Columns, Rows, Color, Size, and Text.

  • 5: The canvas (sometimes called the view or visualization) is where Tableau will draw visualizations based on where you drag and drop fields. You may also drag and drop fields directly onto the canvas.


    Observe the distinction between fields that are in the Data window and fields that are in the view. Fields listed in the Data window are available to add to a view. Fields that you have dropped onto shelves or the canvas are in the view or active fields.

  • 6: The tabs give you easy access to the data connection screen and also to each sheet, dashboard, and story you create in the current workbook. At the bottom is a single tab named Sheet 1. As you build your workbook, you will most likely add new sheets (often also called views), which are individual visualizations. You may also add dashboards (these combine and relate multiple sheets and other components together on a single screen) and even stories (these combine multiple dashboards and views into a unified data story). A set of buttons next to the existing tabs allows the quick creation of new sheets, dashboards, or stories.

  • 7: The status bar will give you information about the current view and includes some options on the right-hand side to navigate sheets in the workbook.

Having created your connection to the data, you are ready to begin to visualize and analyze the data. Over the course of the following examples, you'll take on the role of an analyst for the coffee chain. We'll build multiple visualizations that answer various questions and finally put everything together in an interactive dashboard. As we begin, let's consider a few of the foundational principles.


Foundations for building visualizations

When you first connect to a data source such as the coffee chain data, Tableau will display the data connection and the fields in the Data window in the sidebar on the left-hand side. Fields can be dragged from the Data window onto various parts of the view on the right-hand side. Fields can be dropped onto the canvas area or onto various shelves, such as Rows, Columns, Color, or Size. The placement of the fields will result in different encodings of the data based on the type of field.

The fields from the data source are visible in the Data window and are divided into Measures and Dimensions. Understanding the difference between Measures and Dimensions is essential.


Measures are values that are aggregated. That is, they can be summed, averaged, counted, or they can have a minimum or maximum.

Dimensions are values that determine the level of detail at which measures are aggregated. You can think of them as slicing the measures or creating groups into which the measures fit. The combination of dimensions used in the view defines the view's basic level of detail.

As an example, consider a view created using the Sales and Market fields from the coffee chain connection.

The Sales field is used as a measure in this view. Specifically, it is aggregated as an average. When you use a field as a measure in the view, the type aggregation (for example, SUM, MIN, and MAX) will be shown on the active field. Note in the preceding example that the active field on Rows clearly indicates the average aggregation of sales: AVG(Sales).

The Market field is a dimension with one of four values for each record of data: Central, East, South, or West. When the field is used as a dimension in the view, it slices the measure. So instead of an overall average, the view in the preceding example shows you the average sales for each market.


Tableau makes it easy to recategorize fields and change default aggregations.

You can recategorize a field in the Data window as a dimension or measure by simply dragging the field from Measures to Dimensions or vice versa.

You can recategorize a field in the view as a dimension or measure by right-clicking on the field in the view and then selecting Dimensions or Measures.

You can change the default type of the aggregation of a measure by right-clicking on a Measures field in the Data window and navigating to Default Properties | Aggregation.

You can change the type of aggregation of a field in the view by right-clicking on the field in the view, selecting Measures, and then selecting the desired type of aggregation.

Another important distinction to make with fields is whether a field is being used as discrete or continuous. Tableau will give you a visual indication of the default for a field (the color of the icon in the Data window) and how it is being used in the view (the color of the active field on a shelf). Discrete fields are blue; continuous fields are green.

Whether a field is discrete or continuous, it determines how Tableau visualizes it based on where it is used in the view.


Discrete (blue) fields have values that are shown as distinct and separate from each other. Discrete values can be reordered and still make sense.

When a discrete field is used on the Rows or Columns shelves, the field defines row or column headers.

When used for color, a discrete field defines a discrete color palette in which each color describes a distinct value of the field.

Continuous (green) fields have values that are shown as flowing from one field to another. Numeric and date fields are often used as continuous fields in the view. The values of these fields have an order that it would make no sense to change.

When used on Rows or Columns, a continuous field defines an axis.

When used for colors, a continuous field defines a gradient.

Most dimensions are discrete by default, and most measures are continuous by default. However, any numeric or date field, whether dimension or measure, can be used as a continuous field in the view. Any field, whether dimension or measure, can be used as a discrete field in the view.


To change the default of a field, right-click on the field in the Data window and select Convert to Discrete or Convert to Continuous.

To change how a field is used in the view, right-click on the field in the view and select Discrete or Continuous.

As you work through the examples in this chapter, pay attention to the fields you are using to create the visualizations, whether they are dimensions or measures, and whether they are discrete or continuous. Experiment with changing fields in the view from continuous to discrete and vice versa to gain an understanding of the difference in the visualization.


Visualizing data

A new connection to a data source is an invitation to explore. At times, you may come to the data with very well-defined questions and a strong sense of what you expect to find. Other times, you will come to the data with general questions and very little idea of what you will find. The data visualization capabilities of Tableau empower you to rapidly and iteratively explore the data, ask new questions, and make new discoveries.

The visualization examples in the following sections cover a few of the most foundational chart types. As you work through the examples, keep in mind that the goal is not simply to learn how to create each chart type. Rather, the examples are designed to help you think through the process of discovery, analysis, and storytelling. Tableau is designed to make this process intuitive, rapid, and transparent. Far more important than memorizing steps to create a bar chart is to understand how to use Tableau to create a bar chart and then iteratively adjust your visualization to gain new insight as you ask new questions.

Bar charts

Bar charts visually represent data in a way that makes comparisons of a value across different categories easy to compare. Length is the primary means by which you will visualize the data. You may also incorporate color, size, stacking, and order to communicate additional attributes and values.

Creating bar charts in Tableau is very easy. Simply drag and drop the measure you want to see on either the Rows or Columns shelf and the dimension that defines the categories onto the opposing Rows or Columns shelf.

As an analyst for the coffee chain, you are ready to begin a discovery process focused on profit. Create a new sheet for this and every subsequent example in the workbook you started. This chapter's workbook will contain the complete examples, so you can compare your results.

Begin your analysis with the following steps:

  1. Drag and drop the Profit field from Measures on the Data window on the left to the Columns shelf. You now have a bar chart with a single bar representing the sum of profit for all the data in the data source.

  2. Drag and drop the Product Type field from Dimensions in the Data window to the Rows shelf. This slices the data to give you four bars, representing the sum of profit for each product type.

You now have a horizontal bar chart. This makes the comparison of profit between the product types easy. Notice how the mark type dropdown on the Marks card is set to Automatic and shows that Tableau has determined that bars are the best visualization given the fields you have placed in the view. As a discrete dimension, the Product Type field defines row headers for each product type in the data. As a continuous measure, the Profit field defines an axis that causes each bar to be drawn from 0 to the value of the total profit for each product type.


Typically, Tableau draws a mark (a bar, shape, circle, square, and so on) for every intersection of dimensional values in the view. In this simple case, Tableau draws a single bar mark for each dimensional value (Coffee, Espresso, Herbal Tea, and Tea) of Product Type. The type of mark is indicated and can be changed in the drop-down menu on the Marks card. The number of marks drawn in the view can be observed on the lower-left status bar.

Tableau draws different marks in different ways. For example, bars are drawn from 0 (or the end of the previous bar, if stacked) along the axis. Circles and other shapes are drawn at locations defined by the value(s) of the field defining the axis. Take a moment to experiment with selecting different mark types from the dropdown on the Marks card. Having an understanding of how Tableau draws different mark types will help you master the tool.

Extending bar charts for deeper analysis

Using the preceding bar chart, you can easily see that Coffee has more total profit than any other product type and Tea has less total profit than any other type. What if you want to further understand the profitability of product types in different markets?

Drag the Market field from Dimensions in the Data window to the left of the Product Type field that is already on the Rows shelf.

You still have a horizontal bar chart. But now you've introduced Market as another dimension that changes the level of detail in the view and further slices the aggregate value of profit. By placing Market before Product Type, you are able to easily compare sales for each product type within a given market.

Now you are starting to make some discoveries. For example, Coffee is making a bit more profit than any other product type in the East market but a bit less than other products in the West market.

Let's take a look at a different view using the same fields arranged differently.

Drag the Market field from the Rows shelf and drop it on the Color shelf.

Instead of a side-by-side bar chart, you now have a stacked bar chart. Notice how each segment of the bar is color-encoded by the Market field. Additionally, a color legend has been added to the workspace. You haven't changed the level of detail in the view, so the profit is still summed for every combination of market and product type.


The level of detail of a view is a key concept when working with Tableau. In most basic visualizations, the combination of values of all the dimensions in the view defines the lowest level of detail for that view. All measures will be aggregated or sliced by the lowest level of detail. In the case of most basic views, the number of marks (indicated in the lower-left status bar) corresponds to the number of intersections of dimensional values.

If, for example, Product Type is the only field used as a dimension, you will have a view at the product type level of detail and all measures in the view will be aggregated per product.

If Market is the only field used as a dimension, you will have a view at the market level of detail and all measures in the view will be aggregated per market.

If you use both Product Type and Market as dimensions in the view, you will have a view at the level of product type and market. All measures will be aggregated per unique combination of product type and market.

Stacked bars are useful when you want to understand part-to-whole relationships. Now it is easy to see what portion of total profit for each product type is made in each region. However, it is very difficult to compare the profit for most of the markets across product types. This is because, with the exception of West, every segment of the bar has a different starting place. It is interesting to note that there is no bar segment for South for the Tea product type.

Conclude this example with the following steps:

  1. Experiment by dragging the Market field from Color to the other various shelves on the Marks card, such as Size, Label, and Detail. Observe that in each case, the bars remain stacked but are redrawn based on the visual encoding defined by the Market field.

  2. Finally, drag the Market field off the shelf and drop it in a gray area on the workspace. This will remove that field from the view. You should now have a bar chart that looks like the very first one you created. Later, you'll be able to use this simple bar chart in an interactive dashboard.

  3. Right-click on the tab labeled Sheet 1 at the bottom of the screen and rename the sheet Profit by Product Type.

  4. From the File menu, select Save and save your workbook as CoffeeChainAnalsyis.twb.


At the time of writing this, Tableau does not have an autosave feature. You will want to get into the habit of saving the workbook early and then pressing Ctrl + S or selecting Save from the File menu often to avoid losing your work.

Line charts

Line charts connect related marks in a visualization to show movement or the relationship between connected marks. The position of the marks and lines that connect them are the primary means of communicating the data. Additionally, you can use size and color to visually communicate additional information.

The most common kind of line chart is a time-series. Time series show the movement of values over time. They are very easy to create in Tableau and require only a date and a measure.

Continue your analysis of coffee chain profit using the workbook you just saved:

  1. Create a new worksheet by clicking on the new worksheet button immediately to the right of the Profit by Product Type tab at the bottom. You should now have a new, blank worksheet named Sheet 2 by default. If you accidentally create a new dashboard or story, you can delete it or use the undo button.

  2. Rename the sheet to Profit over Time by right-clicking on the tab and selecting Rename or by double-clicking on the text of the tab.

  3. Drag the Profit field from Measures to Rows. This gives you a single, vertical bar representing the sum of all profit in the data source.

  4. To turn this into a time series, you must introduce a date. Drag the Date field from Dimensions in the Data window and drop it in Columns.

  5. Tableau has a built-in date hierarchy and the default level of detail has given you a line chart connecting 2 years. Let's say you want to see the profit by month. Right-click on the YEAR(Date) field in Columns and select Month from the second set of dates. Future chapters will discuss the details of the various date options.


You can right-click drag and drop a date field as a shortcut to selecting the date option available from this menu. Right-click dragging and dropping other types of fields is a shortcut to quickly selecting other customizations, such as the type of aggregation. If you are using Tableau on a Mac, the equivalent is Option + left-click + drag and drop.

You now have a time series that shows you the profit for each month.

Extending line charts for deeper analysis

Right now, you are looking at the overall profit over time. Let's perform some analysis at a slightly deeper level:

  1. Drag the Market field from Dimensions to Color. Now, you have a line per market with each line in a different color and a legend indicating which color is used for which market. As with the bars, adding a dimension to Color splits the marks. However, unlike the bars where the segments were stacked, the lines are not stacked. Instead, the lines are drawn at the exact value for the sum of profit for each market and month. This allows an easy and accurate comparison.

  2. Drag the Product field from Dimensions and drop it directly on top of the Market field currently in the Marks card. This replaces the Market field with Product. You now have 13 overlapping lines. Often, you'll want to avoid more than two or three overlapping lines. However, note that you can enable highlighting on the color legend using the icon in the upper-right section of the legend. Then, clicking on a product in the color legend will highlight the associated line in the view. This can be a good way to pick out a single item and compare it with all others.

  3. Hold down the Ctrl key and then drag the Product field from Color in the Marks card and drop it in Rows. This copies the field in the view and you now have a line chart for each product. Now you have a way to compare each product over time without overwhelming the overlap. This is the start of a spark-lines visualization that will be developed more fully when advanced visualizations are discussed.

  4. Remove the Product field from the Rows shelf to return to the first time series created in this exercise. Additionally, you may experiment with the undo button in the toolbar.

Geographic visualizations

Tableau makes creating geographic visualizations very easy. The built-in geographic database allows any field recognized as playing a geographic role to define a latitude and longitude. This means that even if your data does not contain latitudes and longitudes, Tableau will provide them for you based on fields such as Country, State, City, or Zip Code. If your data contains Latitude and Longitude fields, you may use them instead of the generated values.


Although most databases do not strictly define geographic roles for fields, Tableau will automatically assign geographic roles to fields based on the field name and a sampling of values in the data. You can assign or reassign geographic roles to any field by right-clicking on the field in the Data window and using the Geographic Role option. This is also a good way to see what built-in geographic roles are available.

The power and flexibility of Tableau's geographic capabilities as well as the options for customization will be covered in more detail in Chapter 10, Advanced Techniques, Tips, and Tricks. In the following examples, we'll consider some of the foundational concepts of geographic visualizing.

Geographic visualization is incredibly valuable when you need to understand where things happen and if there are any spatial relationships within the data. Tableau offers two basic forms of geographic visualization:

  • Filled maps

  • Symbol maps

Filled maps

Filled maps, as the name implies, make use of filled areas, such as the country, state, county or zip code, to show the location. The color that fills the area can be used to encode values of measures or dimensions.

What if you want to understand profit for your coffee chain and see whether there are any patterns geographically? Let's take a look at some examples of how you might do this:

  1. Create a new sheet and name it Profit by Location.

  2. Double-click on the State field in the Data window. Tableau automatically creates a geographic visualization using the Latitude (generated), Longitude (generated), and State fields.

  3. Drag the Profit field from the Data window and drop in on the Color shelf in the Marks card. Based on the fields and shelves you've used, Tableau has switched the automatic mark type to filled maps.

The filled map fills each state with a single color to indicate the relative sum of profit for each state. The color legend, now visible in the view, gives the range of values and indicates that the state with the least profit had a total of $799 and the state with the most profit had a total of $31,785.

You may observe that not all states are shown. Tableau will only draw a geographic mark, such as a filled state, if it exists in the data and is not excluded by a filter. There were only 20 states in the data and therefore, there are only 20 filled states. The rest of the map is a background image.

Filled maps can work well in interactive dashboards and have quite a bit of aesthetic value. However, certain kinds of analyses are very difficult with filled maps. Unlike other visualization types where size can be used to communicate facets of the data, the size of a filled geographic region only relates the geographic size. For example, which state has the highest profit? You might be tempted to say California, but are you sure that's not just because it is larger than Illinois? Which has more profit: Massachusetts or Texas? Use filled maps with caution and consider pairing them with other visualizations for clear communication.

Symbol maps

The other standard type of geographic visualization available in Tableau is a symbol map. Marks on this map are not drawn as filled regions; rather, marks are shapes or symbols placed at specific geographic locations. Size, color, and shape may also be used to encode additional dimensions and measures.

Continue your analysis using the Profit by Location sheet you developed previously:

  1. Drag Area Code from Dimensions to the Detail shelf on the Marks card. Tableau automatically switches to a symbol map and draws a circle at the latitude and longitude of each area code.

  2. Drag Sales from Measures to the Size shelf on the Marks card. At this point, you have color encoded by profit and size encoded by sales. This allows some very useful analysis, as you can immediately identify areas with high sales and low profit. Profit may not have been as useful on the Size shelf because it can have negative values and there is no way to visually represent a negative size.


    You can improve upon the default view. Click on the Color shelf and set the transparency to somewhere between 50 percent and 75 percent. Additionally, add a dark border. This makes the marks stand out and you can better discern any overlapping marks.

Unlike filled maps, symbol maps allow you to use size to visually encode aspects of the data. Symbol maps also allow greater precision. In fact, if you have latitude and longitude in your data, you can very precisely plot marks at a street address level of detail. This type of visualization also allows you to map locations that do not have clearly defined boundaries. Note that if you were to change the mark type from Automatic to Filled Map in the view, you would get an error message indicating that filled maps are not supported at the level of detail in the view.

Using Show Me

Show Me is a powerful component of Tableau. The Show Me toolbar displays small thumbnail images of different types of visualizations, allowing you create visualizations with a single click. Based on the fields you select in the Data window and the fields that are already in the view, Show Me will enable possible visualizations and highlight a recommended visualization. Explore the features of Show Me by following these steps:

  1. Create a new worksheet in the workbook and name it ShowMe Example.

  2. If the Show Me window is not expanded, click on the Show Me button in the upper-right section to expand the window.

  3. Press and hold the Ctrl key while clicking on the Area Code, State, and Profit fields in the Data window to select each of these fields.

    Observe that the Show Me window has enabled certain visualization types, such as text tables, heat maps, symbol maps, filled maps, and bar charts. These are the visualizations that are possible given the fields already in the view in addition to any fields selected in the data window. Show Me also gives a description of what fields are needed for a given visualization type. Symbol maps, for example, require one geographic dimension and up to 2 measures.

Other visualizations are grayed out, such as line charts and histograms. These visualization types cannot be created with the fields that are currently in the view and selected in the Data window. Hover over the grayed out line charts in Show Me. Show Me indicates that line charts require one or more measures, which you have selected, but also require a date field, which you have not selected.


Tableau will actually draw line charts with fields other than dates. Show Me gives you options for what is typically considered good practice for visualizations. Understanding how Tableau renders visualizations based on fields and shelves instead of always relying on Show Me will give you much greater flexibility in your visualizations. At the same time, you will need to cultivate an awareness of good visualization practices.

Finally, note that with Area Code, State, and Profit selected, the symbol map has a blue border in the Show Me window. Show Me indicates the symbol map as most likely the best visualization for the selected fields.

Show Me can be a powerful way to quickly iterate through different visualization types as you search for insight into the data. However, as a data explorer, analyst, and storyteller, you should consider Show Me as a helpful guide that gives suggestions. You may know that a certain visualization type will answer your questions more effectively than the suggestions from Show Me. You may have a plan for a visualization type that will work well as part of a dashboard but isn't even included in Show Me.


You will be well on your way to learning and mastering Tableau when you can use Show Me effectively, but feel just as comfortable building visualizations without it. Show Me is powerful to quickly iterate through visualizations as you look for insight and raise new questions. It is useful to start with a standard visualization that you will further customize. It is wonderful as a teaching and learning tool.

Be careful not to use it as a crutch without understanding how visualizations are actually built from the data. Take time to evaluate why certain visualizations are or are not possible. Pause to see what fields and shelves were used when you selected a certain visualization type.

Conclude the Show Me example by following these steps:

  1. Experiment with Show Me by clicking on various visualization types, looking for insight into the data that may be more or less obvious with different ways of visualizing the data. Circle views and box-and-whisker-plots show the distribution of area code for each state. Bar charts easily expose several area codes with negative profit.

  2. Right-click on the current Show Me Example sheet tab at the bottom and select Delete Sheet.


Bringing everything together in a dashboard

Often, you'll need more than a single visualization to communicate the full story of the data. In these cases, Tableau makes it very easy for you to use multiple visualizations together on a dashboard. In Tableau, a dashboard is a collection of views, filters, parameters, images, and other objects that work together to communicate a data story. Dashboards are often interactive and allow end users to explore different facets of the data.

Dashboards serve a wide variety of purposes and can be tailored for a wide variety of audiences. Consider the following possible dashboards:

  • A summary level view of profit and sales to allow executives to have a quick glimpse into the current status of the company

  • An interactive dashboard allowing sales managers to drill into sales territories to identify threats or opportunities

  • A dashboard allowing doctors to track patient readmissions, diagnoses, and procedures in order to make better decisions about patient care

  • A dashboard allowing the management of a real estate company to identify trends and make decisions for various apartment complexes

  • An interactive dashboard for loan officers to make lending decisions based on portfolios broken down by credit ratings and geographic location

Considerations for different audiences and advanced techniques will be covered in great detail in Chapter 7, Telling a Data Story with Dashboards. For now, let's consider an example that introduces foundational examples.

Continue with the CoffeeChainAnalysis dashboard you have been building, and click on the new dashboard button to the right of the Profit by Location tab. You now have a blank dashboard, and the sidebar on the left-hand side shows options to build a dashboard instead of the Data window that was visible in a worksheet. The sidebar should look like this:

The dashboard window consists of several key components. Techniques to use these objects will be detailed later. For now, focus on gaining some familiarity with the options that are available.

First is a list of all visible worksheets in the dashboard. You can add these to a dashboard by dragging and dropping them. A light gray shading will indicate the location of the sheet once it is dropped. You can also double-click on any sheet, and it will be added automatically.

The next section lists multiple additional objects that can be added to the dashboard. Horizontal and Vertical layout containers will give you finer control over the layout; Text allows you to add text labels and titles. Images and even embedded web content can be added. Finally, a Blank object allows you to preserve blank space in a dashboard or may serve as a placeholder.

Next, you can select whether new objects will be added as Tiled or Floating. Tiled objects will snap into a tiled layout next to other tiled objects or within layout containers. Floating objects will float on top of the dashboard in successive layers.

The Layout section gives you the ability to navigate through a hierarchical structure of objects that have been added to the dashboard. This can be useful for finding objects in complex dashboards.

The final section gives you control over the size of the dashboard as well as pixel-perfect sizing and positioning of floating objects.

Building your dashboard

Continue following these steps to build the dashboard:

  1. Successively double-click on each sheet listed in the Dashboard section on the left-hand side: Profit by Product Type, Profit Over Time, and Profit by Location. Notice that double-clicking on an object adds it to the layout of the dashboard.


    When a worksheet is first added to a dashboard, any legends, filters, or parameters that were visible in the worksheet view will be added to the dashboard. If you want to add these types of objects, select the sheet in the dashboard and click on the little drop-down caret in the upper-right corner of the sheet and locate the object you want to add. Nearly every object has the drop-down caret providing many options to fine-tune appearance and control its behavior:

  2. Add a title of Profit Analysis to the dashboard by dragging the Text object from the sidebar to the top of the dashboard, enter the text, and change the size to 24 pt. You may need to resize the text object using the selection outline. Alternately, you can show the default title for the dashboard by checking the Title option at the bottom of the left sidebar.

  3. Select the Profit by Product Type sheet in the dashboard and click on the drop-down caret in the upper-right section. Navigate to Fit | Entire View. The Fit options describe how the visualization should fill any available space.


    Be careful when using the various Fit options. If you are using a dashboard with a size that has not been fixed or if your view dynamically changes the number of items displayed based on interactivity, then what might have looked good once might not fit the view nearly as well.

  4. Select the Sales size legend by clicking on it. Click on X in the upper-right section to remove the legend from the dashboard:

  5. Double-click on the title of the Profit by Location sheet in the dashboard to edit the text. Add text to indicate that size indicates sales. Having removed the legend, this is the only way the end user will know what size means.

  6. Select the Profit color legend and use the grab bar at the top of the selection outline to drag and drop the Profit color legend immediately below the map.

  7. Select the Profit by Product Type sheet and click on the drop-down caret in the upper-right section again. Click on Use as Filter.

  8. Edit the title Profit by Product Type and add the click a bar to see details text. It is a good practice to give the end user of a dashboard some indication of what interactivity is possible.

  9. Click on the bar for Tea. The rest of the dashboard should update. Both Profit by Location and Profit over Time are now filtered by the Tea product type:

You have created a dashboard that allows interactive analysis. As an analyst for the coffee company, your visualizations allowed you to explore and analyze data. The dashboard you created can be shared with the management as a tool to help them see and understand the data in order to make better decisions. When a manager selects the Tea product type, it immediately becomes obvious that there is one location where sales are quite high but the profit is actually a loss. This may lead to decisions such as a change in marketing or removing tea from the inventory at that location. Most likely, it will require additional analysis to determine the best course of action. In this case, Tableau will empower you to continue the iterative process of discovery, analysis, and storytelling.



Tableau's visual environment allows a rapid and iterative process of exploring and analyzing data visually. You took your first steps in understanding how to use the platform. You connected to an Access database and used it to explore and analyze the data using some foundational visualization types, such as bar charts, line charts, and geographic visualizations. Along the way, you focused on learning the techniques and understanding key concepts such as the difference between measures and dimensions and discrete and continuous fields. Finally, you put all the pieces together to create a fully functional dashboard that allows an end user, such as management, to understand your analysis and make discoveries of their own.

In the next chapter, we'll explore how Tableau works with data. You will be exposed to fundamental concepts and practical examples of how to connect to various data sources. Combined with the foundational concepts you just learned about building visualizations, you will be well equipped to move on to more advanced visualizations, deeper analysis, and telling fully interactive data stories.

About the Author

  • Joshua N . Milligan

    Joshua N. Milligan has been with Teknion Data Solutions since 2004 and currently serves as a principal consultant. With a strong background in software development and custom .NET solutions, he brings a blend of analytical and creative thinking to BI solutions, data visualization, and data storytelling. His years of consulting have given him hands on experience in all aspects of the BI development cycle from data modeling, ETL, enterprise deployment, data visualization, and dashboard design. He has worked with clients in numerous industries including financial, energy, healthcare, marketing, government, and services. Joshua has been named by Tableau as a Tableau Zen Master every year since 2014. This places Joshua in a group of individuals recognized by Tableau as not only masters of the tool but also who have a deep desire to teach and help others. As a Tableau Ambassador, trainer, mentor, and leader in the online Tableau community, Joshua is passionate about helping others gain insights from their data. He frequently broadcasts webinars to educate and inform the Tableau community and the world at large about the wonders of Tableau and is a much sought after featured speaker at Tableau conferences, user groups and various technology and industry functions. He thrives on helping others. Joshua is the author of the first edition of Learning Tableau, which quickly became one of the highest acclaimed Tableau books for users at all levels. He was a technical reviewer of the Tableau Data Visualization Cookbook, Creating Data Stories with Tableau Public, and his work has been featured multiple times on Tableau Public’s Viz of the Day and Tableau’s website. He also shares frequent Tableau tips, tricks, and advice along with a variety of dashboards on his fun and creative blog site, VizPainter. You can follow Joshua on Twitter at @VizPainter.

    Browse publications by this author

Latest Reviews

(4 reviews total)
good fundamentals explained for tableau.
This ebook clearly explained the basic functionality of Tableau, which helped tremendously when I had to build a demo without ever using it!
Learning Tableau
Unlock this book and the full library for $5 a month*
Start now