A Moving Average calculation helps compute average values based on a range around current values to smooth out fluctuations in your data to obtain a better view with broad trends.
Using Tableau’s Global Superstore Orders table:
- Drag an Order Date field from the Data pane to the Columns shelf.
- Drag Category from the Data pane to the Columns shelf.
- Drag Category from the Data pane to Color on the Marks card.
- Drag a Sales field from the Data pane to the Rows shelf and make sure that a Line bar is selected from the Marks card.
- Control and drag SUM(Sales) to Label on the Marks card.
- Drag another Sales field from the Data pane to the Rows shelf.
- Right-click the Sales field, select Quick Table Calculation and Moving Average.
- Control and drag the Sales field to Label on the Marks card and delete a previous one.
Format: You could format the fields with corresponding currencies.