What are Table Calculations?

Tableau has a fantastic feature called table calculations, or “table calcs” for short. This feature allows users to perform calculations within a table across multiple rows, columns, or cells. Table calcs enable users to compute running totals, percent of totals, moving averages, and more. You also have control over calculations with the ability to define specific dimensions of the data. Whether it’s comparing trends, identifying patterns, or uncovering outliers, table calculations in Tableau offer a versatile toolkit for data analysis and storytelling. In the proceeding examples, I use data from the Superstore dataset, a mock dataset used for training, the table calc I will be using is the percent of total sales within the Superstore.

 

Table Across

Table calcs will automatically default to calculating the results across the table, or “table across” as it’s called in Tableau. For my example, I have taken the three categories and calculated the percent of total sales of each quarter from the beginning of 2021 through to the end of 2023. As highlighted in the picture, we can clearly see Tableau calculating the percent of totals across the table, and in this instance, we are looking at sales for each of the quarters for the category “furniture”. Looking briefly at percentages, the percentage of sales is increasing every year, from 29.08% in 2021 to 37.01% in 2023, which is a good thing for the business as sales are increasing progressively. We can also see that Q4 has had the highest percentage of sales every year, which could mean that the sales for the Superstore are seasonal.

Table Down

The second calculation in the list is “table down”, which will calculate the percent of total sales vertically, as opposed to horizontally, which in this instance will calculate the percent of sales across all 4 categories each quarter. Furniture had the highest percentage of total sales of all the categories of Q1 2021, sitting at 40.75%.

Table

We can also calculate the percentage of the total for the entire table. This means that percentages are calculated across every category, quarter, and year. In the photo below we can see that technology in Q4 of 2023 yields Superstore’s largest percentage of total sales, with 5.72%.

Pane Across

Pane across takes the values of a singular pane. In this case, it takes the values of each category for each individual year. Pane is similar to table across, except it doesn’t span the entire table, instead, it stops at the end of each pane and then starts again. As mentioned earlier, it seems that the data is seasonal, with Q4 of 2023 having the highest percentage of total sales in 2023.

Pane

As you probably guessed, just like how pane across is similar to table across, pane is similar to table down. The difference in this instance is instead of calculating just one quarter across all the categories, you’re calculating the percentage of sales for each individual year across all categories and quarters. Technology in Q4 has the highest percentage of sales in 2021 with 14.84%.

Other Functions

There are more features of table calcs that I won’t delve too deep into, because I have covered the main ones. You can calculate the percentage of total sales within each cell, which will just return 100% in each individual cell. Another powerful feature is ‘specific dimensions’, which gives you customizability of which dimensions you want to select. This is essentially the same thing as selecting any of the other functions, except you are choosing what you want to see, instead of it being predetermined.

In conclusion, table calcs can assists you in viewing your data in a different way. You may not want to see the entire picture at times, you may want to look at specific areas of your data to see where trends are evolving or if a certain area of your company is lacking/excelling.

The Data School
Author: The Data School