- Bernard

# Understanding Tableau's Order of Operations [Ultimate Guide]

Updated: Aug 6

**Introduction**

Tableau’s order of operation is the order in which Tableau performs actions. Anytime you build a view and add filters, those filters are executed in order established by the order of operations.

This order of operation is summarized in the figure below;

**Tableau’s Order of Operation Summary**

**Extract/Data Source Filters**

Both extract and data source filters are the first actions in Tableau’s order of operations and are applied at the Tableau data source page. They are useful in restricting the data users can see when you publish a workbook or data source. A powerful way to omit fields not required in your analysis.

In the example below, if a data source filter is applied to exclude West region (i.e. by keeping the East, South and Central region). Then in all the analysis down the line West region will not be part of it.

*(Note: To add a data source filter, while at the Tableau data source page choose ‘Add’ >>Add…>>Select field)*

**Context Filters**

Context filter is the third filter in Tableau’s order of operation, this filter is like a dimension filter only that it has been applied to the context by right clicking the filter and choosing ‘**Add to Context**’.

By enabling the context filter the following happen;

All other filters added to your view became dependent filters to the context filter – meaning they process only data that goes through the context filter.

The filter pill initially blue turns-out to grey color (indicating a context filter).

**Related:**** A practical example on how to apply context filters in Tableau.**

**Sets, Conditional and Top N filters, FIXED Level of Detail Expressions**

Next in Tableau’s order of operations is sets, conditional and Top N filters and FIXED LOD expressions. All of these are computed right before dimension filters. This means level of detail expressions can be used to show whole numbers that would normally be filtered out by dimension filters which is useful when doing comparisons – computing proportion of total.

In the example below the **Fixed Sales** shows the total sales for all regions regardless of the dimension filter present while **Sales** shows the Sales for only product category ‘**Furniture**’ for all regions. Therefore, in this example, the filter ‘**Furniture**’ (dimension filter) can’t filter ‘**Fixed Sales**’ since this calculation is computed before the dimension filter ‘Furniture’ is applied.

However, if you promote the dimension filter ‘**Furniture**’ to a context filter, then you can filter ‘Fixed Sales’

This simple technique is useful when computing the proportion of total.

**Related:** **Explore how to compute proportion of total using Fixed level of detail expressions.**

**Dimension filters**

Dimension filters are the regular filters which reduce categorical variables down. These filters can be added in Tableau’s view by right clicking the dimension of interest and selecting ‘**Show Filter**’ or simply by dragging the dimension to the Filter shelf.

**Data blending**

Data blending takes place after dimension filters, meaning only fields that are not filtered out will be blended across the data sets.

**INCLUDE/EXCLUDE LOD Expression**

Include and exclude level of detail expressions are similar to Fixed LOD in the sense that they all influence the level of detail being considered in the view. Include LOD tell the calculation which fields to include in the level of detail while exclude LOD does the opposite.

Using the previous example on Fixed LOD but replacing the Fixed calculation with Include Region level of detail results in the** Sales** values being equal to **‘Include Sales’** value. This is because unlike in the case of Fixed calculation the include calculation is evaluated after the dimension filter **‘Furniture’** has been applied. Therefore, context filter is not required to affect the include and exclude filters.

**Measure filters**

Measure filters are the filters that influence continuous/numeric fields by setting the minimum and maximum values. They occur after level of detail calculations.

Measure filters can be added to Tableau’s view by right clicking the measure field of interest and selecting ‘**Show Filter**’ or by dragging the measure field to the filters shelf.

**Totals, Forecasts and Table Calculations, Trendlines and Reference Lines**

Next in the Tableau’s order of operations are totals, followed by forecasts and table calculation then trendlines and reference lines all which are computed within the view.

I hope this article was helpful to you. To receive more of these Tableau tips and tricks, kindly subscribe to our emailing list and be the first to know when we publish

Thank you for reading!!