Creating a Rolling Sum for a Specified Period of Time

Published: 11 Feb 2013
Last Modified Date: 03 Sep 2015


How to create a rolling sum for a specified period of time.


Tableau Desktop


The instructions below will result in a rolling sum for the last twelve months.
  1. In Tableau Desktop, select Analysis > Create Calculated Field.
  2. In the Calculated Field dialog box, enter a name for the field, such as Rolling Sum.
  3. In the formula field, type the following, where <field name> is the name of the field for which the rolling sum is being created:
    WINDOW_SUM((SUM([<Field Name>])- LOOKUP(SUM([<Field Name>]),-1)), -10, 0)
  4. Click OK.
Did this article resolve the issue?