Tableau's Moving Calculations

by Frederik Egervari

A Moving Calculation is a table calculation that can be performed within Tableau. It aggregates values within the past or future to smooth a curve to neglect short time fluctuations from, most of the time, a line chart. This can help to detect interesting patterns behind the data, which you would not see with the regular visualization.

If you take a look at superstore sales on a daily level there are extreme fluctuations within the data (Fig.1).

Figure 1: Superstore sales by day. Since this chart is highly influenced by single big orders, it is a good idea to use a higher aggregation level.

On the Sales pill, you can click ‘Quick Table Calculation’ and ‘Moving Average’ and you’ll see how your chart changes. The Chart will look more flattened.

By clicking on ‘Edit Table Calculation’ on Sales, we can see how Tableau has calculated the formula (Fig.2).

Figure 2: The Table Calculation to get a Moving Calculation and its important components.

The Calculation behind a moving average is shown in Fig.3.

Figure 3: Underlying calculation of a moving average.

Sun 10 Sep 2023

Sat 24 Dec 2022

4 mins read

Wed 31 Aug 2022