Tableau Table Calculations

Tableau Table Calculations are the special type of calculated field. Unlike regular calculated fields, table calculations in Tableau are based on the data that is currently visualized in a report. This article shows how to create Tableau table calculations, and how to use their properties.

For these Tableau Table calculations demo, we use the Global Super Store Excel Worksheet. Before creating Table Calculations, let me create a Table Report.

Tableau Table Calculations 1

Create Tableau Table Calculations

In Tableau, you can create table calculation in multiple ways, and the first approach is: Right-click on the measure, and select Create -> calculated Fields. The second approach, please navigate to Analysis Tab and select Create Calculated Field… option

Please refer to Table Report, calculated field and Connecting to the Excel Files in Tableau.

Tableau Table Calculations 2

Selecting the Create Calculated Field… option will open the following window. Here, we renamed the default calculation name as Cal. The below statement will find the First records in this data. Here, you can click OK to close this window

Tableau Table Calculations 3

Or you can click Default Table calculation hyperlink to alter the default settings, and it opens the following window.

Tableau Table Calculations 4

Use this window to change the Calculation field, Levels, etc. I am not a fan of making any modifications using this window. However, you can do it. Let me click Cancel button to close Table calculation window, and then click OK button

Tableau Table Calculations 5

Let me drag this first table calculation to the Measures shelf in the Tableau design area.

Tableau Table Calculations 6

Edit Tableau Table Calculations

Click the down arrow, and select the Compute using to change the computing options.

Tableau Table Calculations 7

Let us see the list of available options in the table Calculations. For this, let me select the Edit Table Calculation option.

Tableau Table Calculations 8

It will open a new window called Table calculation.

Tableau Table Down Table Calculation

It will start calculating from the first row to the end row in a complete table.

Tableau Table Calculations 9

Pane Down Table Calculation

It will calculate from the first row to the end row in a Pane or group. From the below screenshot, the First is applying for each quarter.

Tableau Table Calculations 10

Specific Dimension Table Calculation

You can use any dimensional column to compute the table calculation. Here, it is applying the FIRST function for each year.

Tableau Table Calculations 11

You can also change the Sort order, and sorting column

Tableau Table Calculations 12

Let me add Segments filed to Columns shelf to explore a few more options in the Table Calculations. As you can see, it is displaying a few more options.

Tableau Table Calculations 13

Tableau Table across Table Calculations

It will apply the first function for each row in a table.

Tableau Table Calculations 14

Tableau table across then down

It will apply the first function for each row in a table and then go to the next row.

Tableau Table Calculations 14

Tableau Table down then across

It will apply the first function for each row in a column and then go to the next column.

Tableau Table Calculations 16

Tableau Pane Down

It will calculate from the first row to the end row in a Pane or group.

Tableau Table Calculations 17

Tableau Pane Down then down

It will calculate from the first row to the end row in a Pane or group.

Tableau Table Calculations 18

Tableau Table Calculation Specific Dimension

As we said before, use your own dimension to compute the table calculation. Here, it is applying the FIRST function for each quarter.

Tableau Table Calculations 19

The FIRST function calculates for each quarter and segment.

Tableau Table Calculations 20

Here, the FIRST function applies for each year and segment.

Tableau Table Calculations 21