In Part two of this series, we covered a method of distillation to reduce data volume and size. However, we need to translate our distilled records into their non-distilled forms. In addition, we’ll cover the concept of global and local filters and how to effectively use each to optimize background queries for Tableau Dashboards.
Reverse-Distillation & Filters
Having been left with a distilled security object, we need an object to translate distilled records into their non-distilled forms. In addition, we need to be able to slice all subsequent objects and visualizations into various global lenses for departments. For example, an Order ID can be tagged to multiple departments, such as Finance and Marketing, with each department wanting to know what their coverage is with respect to sales. With this premutation as a requirement, we can create a lookup and global filter table as shown:
Figure 5: Lookup & Global Filter Table
Note that we can have as many permutations required from Global Filters in this table. Since User Name is isolated in a separate security object, this table is much smaller compared to its security counterpart.
Filters & Parameters
With multiple ways to filter data in Tableau, it’s important to note when and where to use each type. Filtering not only curates visualizations into specific dimensions, it also limits the total amount of data needed to populate various visuals — a Tableau best practice.
Global Filters
Global filters would apply to all downstream objects in the data model. Thus, global filters commonly span all dashboards and visualizations contained in a workbook. Global filters also have the largest impact on the total amount of data needed to populate various visuals as shown:
Figure 6: Secured Data Model with Local & Global Filters
In the model above, global filters would effect our various fact tables by relating on Order ID. Security would be enforced by relating our SECURITY and GLOBAL_FILTERS object through Distilled Order ID. Since global filters impact
Parameters
In cases where filters aren’t global and only apply to certain objects, a parameter can be used to limit data. Parameters also have the benefit of not requiring an explicit relationship between objects. Thus, a parameter could be used to filter FACT_1 and FACT_2 without having to create records in our GLOBAL_FILTERS object.
Local Filters
Local filters apply only to the object it’s contained in. Thus, local filters would be constrained to a specific visual and object. Local filters would not span all dashboards and visualizations contained in a workbook. Thus, local filters have limited impact when compared to global filters.
In Part 4 of our series, we’ll cover Tableau Relationships and visual-specific objects to further optimize our data model. Stay tuned!