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)

Building a text table

In this recipe, we will build a simple table that includes two dimension, and one measure. Dimensions will define the column and row headers, while the measure will be aggregated.

Getting ready

Connect to the Baby_names.csv dataset and open a new worksheet.

How to do it...

  1. Drag and drop State from Dimensions into the Rows shelf.
  2. Drag and drop Gender from Dimensions into the Columns shelf.
  3. Drag and drop Frequency from Measures onto Text in the Marks card:

How it works...

We have placed State and Gender, two discrete dimensions, into the rows and columns of our table. However, this still leaves the table itself empty. We can only see the Abc placeholder text. When we place Frequency, a continuous measure, onto Text, Tableau fills our table with that measure, and automatically aggregates it along the dimensions we placed in rows and columns.

There's more...

When you place a continuous measure into a view, Tableau needs to aggregate it. It will use SUM as the default aggregation function. You can also see that if you look at the Frequency pill in Text, in the Marks card, it says SUM(Frequency):

However, you can change the aggregation function. Hover over the SUM(Frequency) pill in the Marks card, so that a white arrow appears on it, and click on the arrow. If you hover over Measure (Sum) in the drop-down menu, it opens another drop-down menu. From it, you can choose from a range of aggregation functions, as shown in the following screenshot:

Keep in mind that this method of aggregation only affects the worksheet it is applied in. To change the default aggregation function for a particular measure across all worksheets, consider using the Default Properties function, which is available in the drop-down menu that will appear when we right-click a field under Measures.

See also