Back to Analysis

Calculated Fields

Creating custom calculated fields in Tableau — basic arithmetic formulas (e.g., a Cost field using SUM([Sales]) - SUM([Profit])), MIN/MAX aggregation functions, and CEILING/FLOOR functions for numeric rounding and formatting.

10 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.

Ready to continue?

Mark this lesson as complete when you're ready to proceed.

Key moments

  1. Introduction & Setup — Loads the Global Superstore Orders table and adds Sub-Category, Sales, and Profit to the view.
  2. Cost Calculated Field — Creates the Cost measure using the formula SUM(Sales) - SUM(Profit) and explains the calculation editor interface.
  3. Calculated Field Icon — Explains how the '=# ' icon distinguishes custom calculated fields from native data source fields.
  4. Disaggregating Measures — Uses the Analysis menu to uncheck Aggregate Measures and inspect row-level sales transactions for products.
  5. MIN and MAX Calculations — Builds MIN(Sales) and MAX(Sales) calculated fields and demonstrates resolving syntax errors during entry.
  6. CEILING and FLOOR Functions — Formats measures to two decimal places and demonstrates rounding numbers upward with CEILING and downward with FLOOR.
PDF notes

Frequently asked questions

How can I tell if a field in the Data pane is native or user-created?

Calculated fields have an equals sign prefixed to their data type icon (e.g., '=#') in the Data pane.

Why does MAX(SUM([Sales])) produce a calculation error?

Tableau does not allow basic aggregate functions to be nested directly without using table calculations or Level of Detail expressions; use MAX([Sales]) instead.

What happens when I toggle 'Aggregate Measures' in the Analysis menu?

Unchecking 'Aggregate Measures' disaggregates the view to display every individual underlying row from the data source rather than summing them.

How was this lesson?

Your feedback helps us refine explanations and catch bugs.