When and where data densification occurs

Data densification can take place in the source if you choose to fill in missing data with certain joins, unions, or custom queries. But here, we are focused on data densification that takes place in Tableau after aggregate data is returned from the source. Specifically, under certain circumstances that we'll consider, Tableau fills in missing values in the aggregate data in the cache, as seen in the following figure:

You'll recognize that the preceding figure is very similar to the figure we examined when we started the discussion of table calculations. In fact, data densification happens at relatively the same time as table calculations, and sometimes, can even be triggered by table calculations. Here are some examples of times when data densification is enabled:

  • When the Show Missing Values option is enabled for dates or bins used as headers on Rows or Columns. Here, Tableau will show headers for dates or bin values (between the minimum or maximum dates/bin values), even if they don't occur in the data (or are eliminated by a filter). You can easily turn this densification on or off by selecting the desired option.
  • With Show Missing Values enabled, certain table calculations used in the view will additionally add marks in the view for the missing headers. We'll take a look at an example later in this section.
  • Enabling the Show Empty Rows/Columns option (from the top menu, navigate to Analysis | Table Layout | Show Empty Rows/Columns) causes Tableau to show all the row / column headers, even if particular values wouldn't normally be shown based on filter selections. This option is context-specific, so the domain of values shown is either for the entire dataset or for the context defined by context filters. Observe the difference between the Categories shown with and without the option checked:
  • Using certain table calculations with discrete dimensions on Rows and/or Columns will cause Tableau to turn on data densification. Let's take a look at an example and how to optionally turn off the resulting densification.

Observe the difference between the following two views:

This view has 14 marks (you can see the count in the status bar), indicating that there are fourteen valid intersections of Containers and Ship Modes. Some combinations simply don't occur in the data (for example, a Jumbo Drum is never sent by Express Air).

But adding a table calculation such as Index() to Detail causes Tableau to fill in the missing intersections, as shown:

Tableau has filled in the combinations of Containers and Ship Modes, and there are now 21 marks. Sometimes, this behavior might be useful (we'll see an example), but many times you may want to avoid the densification. How can you turn it off?

With an understanding that Tableau has enabled the densification because of the discrete dimensions on Rows and Columns, you can rearrange the view so that only one dimension remains on Rows or Columns. This view, for example, keeps Ship Mode on Detail to keep it as a part of the view level of detail, but uses the special aggregation ATTR on Columns:

The result is a view without data densification showing only 14 marks.

Keep an eye on the status bar and the count of marks. This will help you identify possible cases of data densification. You will then be able to decide when you wish to leverage densification or when it is useful to turn it off.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset