Book Image

Tableau 2019.x Cookbook

By : Dmitry Anoshin, Teodora Matic, Slaven Bogdanovic, Tania Lincoln, Dmitrii Shirokov
Book Image

Tableau 2019.x Cookbook

By: Dmitry Anoshin, Teodora Matic, Slaven Bogdanovic, Tania Lincoln, Dmitrii Shirokov

Overview of this book

Tableau has been one of the most popular business intelligence solutions in recent times, thanks to its powerful and interactive data visualization capabilities. Tableau 2019.x Cookbook is full of useful recipes from industry experts, who will help you master Tableau skills and learn each aspect of Tableau's ecosystem. This book is enriched with features such as Tableau extracts, Tableau advanced calculations, geospatial analysis, and building dashboards. It will guide you with exciting data manipulation, storytelling, advanced filtering, expert visualization, and forecasting techniques using real-world examples. From basic functionalities of Tableau to complex deployment on Linux, you will cover it all. Moreover, you will learn advanced features of Tableau using R, Python, and various APIs. You will learn how to prepare data for analysis using the latest Tableau Prep. In the concluding chapters, you will learn how Tableau fits the modern world of analytics and works with modern data platforms such as Snowflake and Redshift. In addition, you will learn about the best practices of integrating Tableau with ETL using Matillion ETL. By the end of the book, you will be ready to tackle business intelligence challenges using Tableau's features.
Table of Contents (18 chapters)

Customizing tooltips

When you hover over a point in your view, a tooltip will appear. Tooltips are small boxes, holding detailed information about a data point in the view, and are present by default. In this recipe, you will learn how to customize tooltips.

Getting ready

To follow this recipe, connect to the Baby_names.csv data source and open a new worksheet.

How to do it...

  1. Drag and drop Frequency from Measures onto Size in the Marks card.
  2. Drag and drop State from Dimensions onto Detail in the Marks card.
  3. Drag and drop State from Dimensions onto Label in the Marks card.
  4. Drag and drop Frequency from Measures to Color in the Marks card.
  5. Click on the drop-down menu in the Marks card and select Circle:
  1. Drag and drop Name from Dimensions into the Filter shelf.
  2. In the Filter [Name] window, click None to deselect all values.
  3. Start typing emma in the search bar at the top of the list, select Emma, and click on OK:
  1. Drag and drop Gender from Dimensions onto Detail in the Marks card.
  2. Drag and drop Name from Dimensions onto Tooltip in the Marks card.
  3. Double-click on Tooltip in the Marks card.
  4. In the Edit Tooltip window, hit Enter to add a row above the existing text and place your cursor in the new row.
  5. Click on Insert and select ATTR(Name):
  1. Click on Insert again and select Gender.
  1. Between <ATTR(Name)> and <Gender>, type is a beautiful. After <Gender>, type name. The whole expression should be <ATTR(Name)> is a beautiful <Gender> name, as shown in the following screenshot:
  1. Click on OK. The expression we entered into the tooltip will now appear when you put your mouse over any of the circles:

How it works...

Tooltips are, by default, set to hold information on the fields that are in the view and their current values. However, as we just saw, you can customize them by adding additional elements, or removing the ones that are there by default. We inserted fields such as Name and Gender into the Tooltip section; they will change automatically. If we change the Name filter from Emma to another name, it will change the value of the name in the sentence, as well as automatically update the gender.

There's more...

You can also insert another worksheet from the workbook into the tooltip. Let’s say you want your user to be able to see where the particular state is on the map. We can do this by executing the following steps:

  1. Create another sheet with the map, just by opening a blank worksheet and double-clicking on State in Dimensions.
  2. On the original sheet, double-click on Tooltip to open the Edit Tooltip window and add an empty row:
  1. Click on Insert and navigate to Sheets | Sheet 2. Tableau will insert an expression referencing Sheet 2 into the Tooltip section:
  1. If you go to Sheet 2, you will notice that Tableau added Tooltip (State) as a filter. When your mouse cursor goes over any of the states in Sheet 1, a tooltip with a map marking that state will show up:

See also