Calculations in Tableau Desktop Part 1: Basic Calculations

There are 3 main types of calculations in Tableau Desktop that can be used to create calculated fields:

Types of calculations in Tableau Desktop

This blog focuses on the first type, namely basic calculations (or basic expressions).


What are calculations used for?

  1. If the data you need for analysis doesn't exist in the original data source.
    1. If you have Sales and Cost fields but not Profit, you can calculate Profit (using a calculated field).
  2. If you want to transform values in your visualisation.
    1. If you want to calculate the difference in Sales from one quarter to the next (using a table calculation).
  3. If you want to categorise data.
    1. If you want to colour bars in a bar chart to show if Profit was above or below 0.

Calculated Fields

Calculated fields create new data from data that already exists in your data source by creating a new field (column). The original data remains unchanged.

Calculated fields are generally used to:

  • Change the data type of a field (convert a string to a date)
  • Aggregate data (using mathematical functions like SUM( ), AVG( ), etc.)
  • Filter

Calculated Fields Interface

How to create a calculated field and the interface

Calculated fields are created using different types of calculations.


Basic Calculations

There are two types of basic calculations in Tableau Desktop, row-level calculations and aggregate calculations.

The two types of basic calculations

Row-Level Calculations

Example of a row-level calculation

Aggregate Calculations

Rules for aggregate calculations
Example of an aggregate calculation

The next blog titled 'Calculations in Tableau Desktop Part 2: Level of Detail (LOD) Expressions' is the second part of this series and will explain what LODs are and why we need to use them!

Author:
Amelia Young
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
© 2026 The Information Lab