# Logical, number, aggregate and spatial calculations

*Tableau Data Analyst Study Guide · Explore and Analyze Data · Last updated October 29, 2026 · https://www.certifyforce.com/study-guide/tableau-data-analyst/explore-and-analyze-data/logical-number-aggregate-and-spatial-calculations*

Write IF, CASE and IIF tests that handle nulls the way a requirement asks, pick ROUND, CEILING, FLOOR, DIV or INT (and formatting) for numbers, keep aggregate and row-level values apart, and build points, lines, radius zones and distances with MAKEPOINT, MAKELINE, BUFFER and DISTANCE.

- Certification: Salesforce Tableau Data Analyst
- Exam section: Explore and Analyze Data
- Study guide: https://www.certifyforce.com/study-guide/tableau-data-analyst

**Official exam objective:**

> Create calculated fields: Write date calculations; Write string functions; Write logical and Boolean expressions; Write number functions; Write type conversion functions; Write aggregate functions; Write basic spatial calculations.

## What the exam expects

- Write IF, ELSEIF, CASE and IIF expressions, predict which branch fires when tests overlap, and send null values to the label the requirement asks for.
- Choose between ZN, IFNULL and ISNULL for null handling.
- Pick ROUND, CEILING, FLOOR, DIV or INT from the output a number needs, and know when number formatting beats ROUND.
- Fix "cannot mix aggregate and non-aggregate" errors and predict how an aggregate calculation behaves on a shelf.
- Build a basic spatial calculation with MAKEPOINT, MAKELINE, BUFFER or DISTANCE.
- Date, string and conversion functions: see Date, string and type conversion functions; first calculated fields: the Desktop Foundations unit Calculated fields and when to use parameters.

Key terms:
- **Unknown result:** a test that evaluates to null rather than true or false.
- **Row-level calculation:** computed at the data source level of detail, once per row.
- **Aggregate calculation:** computed at the visualization level of detail, once per mark.
- **AGG():** the shelf name of an aggregate calculation, which cannot be aggregated further.
- **Spatial point:** a geometry built from latitude and longitude, the input to MAKELINE, BUFFER and DISTANCE.

## Key facts

| Fact | Detail | Source |
|---|---|---|
| IF evaluation | Returns the THEN value for the first true test | [Logical Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_logical.htm) |
| No ELSE | IF or CASE with no match and no ELSE returns null | [Logical Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_logical.htm) |
| IIF unknown | Optional fourth argument returned when the test is null; omitted means null | [Logical Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_logical.htm) |
| ZN | Returns the expression, or 0 when null | [Logical Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_logical.htm) |
| INT | Truncates toward zero | [Type Conversion](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_typeconversion.htm) |
| DIV | Returns the integer part of a division | [Number Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_number.htm) |
| ROUND precision | Formatting may be preferable to ROUND because of floating point representation | [Number Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_number.htm) |
| Mixing rule | An aggregated and a disaggregated value cannot be combined | [Aggregate Functions in Tableau](https://help.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_aggregate_create.htm) |
| Aggregate result | Always a measure, shown as AGG(name) on a shelf | [Aggregate Functions in Tableau](https://help.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_aggregate_create.htm) |
| MAKEPOINT input | Native latitude and longitude columns, latitude first | [Spatial Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_spatial.htm) |
| BUFFER on a point | Polygon centered on the point, radius = distance and units | [Spatial Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_spatial.htm) |
| DISTANCE | Returns a number; created only on a live connection | [Spatial Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_spatial.htm) |

## Check yourself

- What does an IF return for a row that matches no test when there is no ELSE?
- Why can't every IF be rewritten as a CASE?
- Can a negative decimals argument make ROUND round to hundreds on any data source?
- Why is MAX(SUM([Sales]), [Profit]) invalid?
- Which argument comes first in MAKEPOINT?

## Sources

- [Logical Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_logical.htm)
- [Number Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_number.htm)
- [Type Conversion](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_typeconversion.htm)
- [Aggregate Functions in Tableau](https://help.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_aggregate_create.htm)
- [Types of Calculations in Tableau](https://help.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields_understand_types.htm)
- [Spatial Functions](https://help.tableau.com/current/pro/desktop/en-us/functions_functions_spatial.htm)
- [Create Maps that Show Paths Between Origins and Destinations in Tableau](https://help.tableau.com/current/pro/desktop/en-us/maps_howto_origin_destination.htm)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 8 linked practice questions, and unlimited timed mock exams are included with the Tableau Data Analyst pack (USD $19): https://www.certifyforce.com/practice-exams
