Book Image

Data Modeling with Tableau

By : Kirk Munroe
Book Image

Data Modeling with Tableau

By: Kirk Munroe

Overview of this book

Tableau is unlike most other BI platforms that have a single data modeling tool and enterprise data model (for example, LookML from Google’s Looker). That doesn’t mean Tableau doesn’t have enterprise data governance; it is both robust and highly flexible. This book will help you effectively use Tableau governance models to build a data-driven organization. Data Modeling with Tableau is an extensive guide, complete with step-by-step explanations of essential concepts, practical examples, and hands-on exercises. As you progress through the chapters, you’ll learn the role that Tableau Prep Builder and Tableau Desktop each play in data modeling. You’ll also explore the components of Tableau Server and Tableau Cloud that make data modeling more robust, secure, and performant. Moreover, by extending data models for Ask and Explain Data, you’ll gain the knowledge required to extend analytics to more people in their organizations, leading to better data-driven decisions. Finally, this book will guide you through the entire Tableau stack and the techniques required to build the right level of governance into Tableau data models for the correct use cases. By the end of this Tableau book, you’ll have a firm understanding of how to leverage data modeling in Tableau to benefit your organization.
Table of Contents (22 chapters)
1
Part 1: Data Modeling on the Tableau Platform
4
Part 2: Tableau Prep Builder for Data Modeling
9
Part 3: Tableau Desktop for Data Modeling
14
Part 4: Data Modeling with Tableau Server and Online

Pivoting rows to columns

In this section, we will explore pivoting rows to columns. There are instances when our data sources have multiple, conditional fields contained in the same column. This structure of data will cause problems because Tableau likes every column to be a unique field. If we look at the structure of our Bad Measures.xlsx file, as shown in Figure 5.7, you can see that there is a column called Measure and another column called Value. The ideal data structure would have four columns, one for the date and one each for sales, profit, and volume:

Figure 5.7 – The Bad Measures file

Figure 5.7 – The Bad Measures file

If we don’t pivot these rows to columns, analysts using Tableau Desktop don’t have an easy way to create views and dashboards in Tableau. The best they could hope for is to create three calculated fields, one for each of the measures, as shown in Figure 5.8:

Figure 5.8 – Result of calculated fields

Figure 5.8 – Result of calculated fields

This approach...