The Order Of Operations - Tableau Style


Please Excuse My Dear Aunt Sally…

…better known as PEMDAS (or BODMAS or BIDMAS if you’re from the UK. Don’t worry, it was my first time hearing about those variations too.) For my math students, I used GEMDAS. And it makes sense, I promise! If you’re interested in the breakdown, scroll to the end. I got you.

Now, on to the reason you’re here...

        Tableau Desktop and its Order of Operations

                       → Extract Filters

                       → Data source Filters

                       → Context Filters

                       → Dimension Filters

                       → Measure Filters

                       → Table Calculation Filters

As far as I know, there is no fancy acronym for this Order of Operations.

                         E-D-C-D-M-T.

Every Dog Can…

Each Day Comes…

If I come up with anything I will let you know. Stay tuned!

Until then, let’s go over GEMD… I mean, EDCDMT!

E - Extract Filters

This one took me a while to wrap my head around and ultimately I realized that it was because I had not worked with any Extract Filters as of yet because I have not yet worked with any data in which I only wanted access to a portion of it. After a few explanations and re-explanations from my peers and coach (shoutout to DSNY6 and Sam Shurmer!) I now have a much better understanding.

Extract Filters are applied to any data set where we realize that we do not and WILL NOT need some of the data. Now, you may be the one that will be working with this data or it may be someone else. Either way, keep in mind that the data that we extract after the extract filter has been applied will be all that we will have access to. (Forever).

As an example, suppose we are working on a project for your neighborhood community board and they want to know how many cars run red lights on weekend mornings compared to the weekend nights. The red light cameras, as you can likely assume, don’t only capture weekend morning traffic but rather, 24/7 traffic. Now, do we need all of the data that has been collected between Monday and Friday? No, we don’t. So this is where we would use an extract filter to gather only the data that has been collected on Saturdays and Sundays. At this point, you will only have the traffic data from those 2 days to work with and that is what you will find in your server.

The benefit to extract filters - the data has now been optimized for security and performance! Anyone that has access to this server does not have to lug around all of the other weekday data and it's also inaccessible which lends itself well to additional security. You can’t use what you can’t access.

Note: Incremental extract filters do exist and they keep the data updated, refreshing on a constant time basis, should that be necessary.

D - Data Source Filters

Now that the data is in a server, it can now be brought in for cleansing or, if it’s already clean, it can be analyzed. At this point we can apply any data source filters that we want to utilize. Referencing our red traffic light example, we can now filter out weekend afternoons and early evenings. This way we can directly compare the weekend morning traffic to the weekend night traffic. However, should the community board want to adjust the hours that we would consider for morning and night or should they want to include other times of the day in the conversation, we can actually go back and adjust the data source filters. In other words, unfiltered data is still accessible, unlike the weekday data that we left behind after the extract filter was applied.

C - Context Filters

Context filters are filters that get applied to the Tableau worksheet (keyword: worksheet) before any other filters get applied. So, if we apply any of the remaining filter types before or after the context filter is applied, Tableau will still process the Context Filter first. Context Filters are great for showing the Top N or for forcing a particular filter to be utilized first!

For myself, when I bring a categorical field into my filter shelf and I “Add to Context,” I imagine that I am telling myself that I want that filter to be the context, i.e. THE STORY. I do not want that categorical filter to further limit my results. Rather, I want my results to be shown within the limitations of that field.

For example, using our Superstore Dataset, suppose that we want to see the 5 most popular types of office supplies. To do this, we will display the quantity of items sold by Sub-Category.

Then, we will filter the Sub-Category field to show the top 5 by Sum of Quantity.

The workspace will reveal a bar chart with the 5 sub-categories of which the most items were sold.

When the Category field is brought to the filter

and we choose Office Supplies,

we will now see all of the office supplies that fell WITHIN this top 5.

These are NOT the 5 most popular office supplies. Because this current result does not meet the requested criteria, we want to tell Tableau to turn the Office Supplies category into THE STORY. We want to see the top 5 office supplies, not the top 5 items and then those that fell within the Office Supplies category. So, now we can right-click on the ‘Category: Office Supplies’ filter or select the drop-down arrow and choose ‘Add to Context’.

The workspace will adjust and we will now see what we have asked for! The top 5 office supplies! Woohoo!


D - Dimension Filters

First, it is important to know that dimension fields are all of the Blue pills! These fields often contain data that is qualitative. Think back to the Superstore dataset. In the previous section on Context Filters, when we placed the Category field into the filter shelf and selected one, a few, or all of the categories, we applied a Dimension Filter! Dimension filters can be used to create groups, sets, and bins. Also, when we find the Top N (...or if we find the Bottom N, or we create a formula), we are also utilizing the Dimension Filter.

M - Measure Filters

Based on our last section, you can guess correctly that the measure fields are all of the Green pills! These fields contain data that is always quantitative. Measure filters, in general, will be handled in the same fashion as Dimension filters but they will be used to filter the aggregate of the values from that field.

T - Table Calculation Filters

Table Calculation Filters are applied last in the Tableau Order of Operations. They are created from calculated fields, which will show up in your Data pane, and from there they can be moved to the Filter shelf. In addition, they will only affect the data that is shown on the workspace at that moment.

And, that’s all folks!

                         E-D-C-D-M-T

And as promised,

            Every Dog Can Do Many Tricks! Or Effective Data Can Describe Many Things!

                         Your choice!



And for those of you who made it this far - GEMDAS!


Connect with me on LinkedIn!

Author:
Randee Johnson
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab