Quick Tips in Pics #2: 'Compute Using' for Table Calcs

by Megan Hunt

When you’re first using Tableau and come across table calculations it can be somewhat daunting.  There’s the great Quick Table Calculation option when you right click a Measure but if you have something in columns then this will default to computing across the table.  What if you want to compute in a different way?  You can always right click the Measure again, change the Compute Using… option and choose from the list but what do they actually mean?  Here’s a quick pictorial guide to help understand the basic premise of table calcs.

table-calc-menu

Above:  The right-click menu Compute Using… option

Table (across)

table-across table-across-tableau

The result of the computation shows at the end of the rows.

Table (down)

table-downtable-down-tableau

The results of the computation show at the end of the columns.

Table

bothboth-tableau

The results of the computation show in the bottom right cell.

Table (across then down)

across-then-downacross-then-down-tableau

The computation runs along the first row and then continues to the first cell of the second row before continuing in this fashion to the end of the table.  In the case above this is a running total computation along Market.  You see the Grand Totals of sales for each Market across the four years of data.

Table (down then across)

down-then-acrossdown-then-across-tableau

The computation runs down each column first then continues to the next column down.  This example shows a running total of sales calculated along Years in all Markets combined.  The total for each year is used as the basis for adding the following year sales.

P.S. Don’t forget that Quick Table Calcs are not the only table calc functions available in Tableau.  Check out the function list on the right when you use Create Calculated Field for a whole list as well as example syntax of how they can be used.  All of these functions can also be modified with the Compute Using… computation as well.

list-of-table-calcs

READ MORE: Why and when to use table calculations in Tableau by Anna Noble.