# Tableau Prep Builder: Formulas and Calculations (Part 4 of 7)

> This is content from just-tim, the data-and-analytics channel by Tim Ngwena (formerly 'Tableau Tim'). Tim has 12+ years of hands-on BI experience and covers Tableau most of all, plus Power BI, Looker, Hex, SQL and data modelling, the analytics industry, and the craft of doing the job — always tool-agnostic and honest about the trade-offs.

- **Author:** Tim Ngwena (just-tim, https://just-tim.com/about)
- **Published:** 2020-01-27
- **Format:** Video · 16 min watch · transcript available
- **Topics:** Data prep
- **Tools:** Tableau (calculated fields, filters, prep)
- **Canonical:** https://just-tim.com/posts/tableau-prep-builder-formulas-and-calculations-part-4-of-7
- **Watch:** https://www.youtu.be/IvjXFzTrVmI

This is the fourth video in my Tableau Prep for Excel users series, focusing purely on formulas and calculations. I walk through adding a calculation step, building a profit ratio calculation, and creating filter calculations on dates, while explaining why aggregations don't work the way Tableau Desktop users might expect.

## Key takeaways

- Tableau Prep calculations work at the row level of detail, so aggregations like SUM() cause errors here unlike in Tableau Desktop; a separate aggregation step is required.
- Rename and add descriptions to your steps (e.g. 'calculation step') to document your flow as best practice for others.
- Be careful dragging columns in Prep: dropping one column onto another merges them, so watch for the visual line cue that indicates placement between columns.
- Filter calculations produce a true/false Boolean and filter the dataset directly rather than creating a new column, whereas a calculated field keeps those values visible.
- The list view and aggregated summary view make it far easier to read columns and verify what your calculations are doing through highlighting.

## Chapters

- 0:00 Setting up the sample flow
- 1:19 Adding and naming a calculation step
- 3:05 Arranging columns to find fields
- 5:27 Building the profit ratio calculation
- 5:49 Row-level detail versus aggregation
- 8:34 Creating a filter calculation on dates
- 13:31 Filter calculation versus calculated field

Watch the full video, read the transcript and use chapter deep-links on the page: https://just-tim.com/posts/tableau-prep-builder-formulas-and-calculations-part-4-of-7

---
just-tim — Data and analytics, with a point of view. · https://www.youtube.com/channel/UC7HYxRWmaNlJux-X7rNLZyw · https://twitter.com/TableauTim · https://www.linkedin.com/in/timngwena
