In preparation for our Tableau Exam, here at The Information Lab, we are going over some Tableau concepts, especially ones that might be confusing. For me, that is Table Calculations! I will go over what Table Calculations are and what they are used for to help anyone who is also on a quest to pass the Tableau Exam.
What are Table Calculations?
Table Calculations are a special type of calculated field that computes the values locally only based on the data you visually see in your visualization.
When you do a Table Calculation (which we will go over in a bit!) it will have delta symbol Δ next to it:

Making Sense of a Table Calculation
When we are doing a calculated field, we are sending queries to a database and it is computed row by row or just by typical aggregations (such as finding the sum).
However, table calculations happen towards the end of Tableau's order of operations. Table Calculations happen after queries are sent and a cache is created (a summarized subset of your data that is locally stored).
Here is a picture illustrating the process:

In summary, Table Calculations are made after the data source sends back a view of a table for you to see. The driver is the interpreter that translates Tableau’s ‘languages’ of VIZQL and XML into code readable for the data source and translates the data received from the data source back into Tableau.
Another Way to View Table Calculations
Table Calculations are like Window functions in SQL! If you have experience with SQL, then you might be able to understand the logic.
For example:
SELECT
region,
order_date,
SUM(sales) AS daily_sales,
SUM(SUM(sales)) OVER (
PARTITION BY region
ORDER BY order_date
) AS running_total
FROM orders
GROUP BY region, order_date;
This SQL code window function would work like this table calculation in Tableau:

How To Read What You Are Clicking
Learning how window functions work can already be difficult, so it might be confusing to know what you are clicking for table calculations.
The following illustration helps me understand what to click just by simplifying it into simple English:

You read the Table Calculation as explained in the photo:“For each *unchecked fields*, compute the *calculation type* by *checked fields*”.
So the example reads:“For each region, compute the running total (of Sum of Profit) by Month of Order Date”.
This was an overview of how Table Calculations work! I would recommend using the Superstore dataset that Tableau provides and using table calculations on it for further practice. Additionally, read the blogs of other people at The Information Lab. They helped me further understand this topic, so it might help you too!
