When and where data densification occurs

Data densification could take place in the source if you chose 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 now consider, Tableau fills in missing values in the aggregate data in the cache, as seen in this diagram:

You'll recognize this diagram as very similar to the diagram we examined when we started the discussion on Table Calculations. In fact, data densification happens at more or less the same time as Table Calculations, and can sometimes even be triggered by Table Calculations. Here are some examples of times when data densification is enabled:

Let's take a look at an example and how to optionally turn off the resulting densification. Observe the difference between the two views, as follows:

This view has 14 marks (you can see the count in the status bar), indicating that there are fourteen valid intersections of Container 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 the Detail causes Tableau to fill in the missing intersections, like this:

Tableau has filled in the combinations of Container and Ship Mode and there are now 21 marks. Sometimes, this behavior might be useful (and we'll see such an example next), 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 as part of the view level of detail, but uses the special aggregation ATTR on Columns, as shown in the following screenshot:

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.