# Multi-row calculations in Tableau Prep | New in Tableau 2023.2

> 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:** 2023-06-19
- **Format:** Video · 12 min watch · transcript available
- **Topics:** Data prep, Data visualisation
- **Tools:** Tableau (calculated fields, data modelling, prep)
- **Canonical:** https://just-tim.com/posts/multi-row-calculations-in-tableau-prep-new-in-tableau-2023-2
- **Watch:** https://www.youtube.com/watch?v=qqH0QV1H7kI

I walk through the new multi-row calculations feature in Tableau Prep, introduced in the 2023.2 release. Using a simple Superstore flow with order date, category and quantity, I demonstrate moving calculations, difference from and percentage difference from, and explain how the visual interface configures the underlying calculation for you.

## Key takeaways

- Multi-row calculations live in the clean step under the quantity field's three-dot menu, offering moving calculation, difference from and percentage difference from options.
- You configure each calculation left to right: group by a field (e.g. category), order by another (e.g. date month), then choose sum or average for the computation.
- The look-back/look-forward dropdown controls the window extent, and ticking the current row matters — looking back one row whilst including the current row spans two rows, producing nulls where prior rows don't exist.
- Tableau Prep visually highlights the moving window row by row and spells out the maths, making it far easier to understand than equivalent window calculations in Desktop.
- Baking moving averages, sums and differences into Prep flows lets you build flexible, question-specific data models without writing heavy LODs, improving dashboard performance on large datasets.

## Chapters

- 0:20 Starter flow and where the feature lives
- 1:51 Building a moving calculation
- 3:39 Configuring the window with look back and forward
- 7:14 Difference and percentage difference from
- 8:51 Using Prep calculations for data modelling
- 10:45 Viewing the underlying formula

Watch the full video, read the transcript and use chapter deep-links on the page: https://just-tim.com/posts/multi-row-calculations-in-tableau-prep-new-in-tableau-2023-2

---
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
