Tableau Funtion: RUNNING_SUM( )

Tableau Function: RUNNING_MIN( )

Category: Table Calculation Functions

What Is the Function?

Purpose

The RUNNING_SUM() function in Tableau is a table calculation that computes a cumulative (running) total of a numeric measure across rows in a partition. For each row, it adds the current value to the sum of all previous values, based on the defined sort order.

In simple terms, RUNNING_SUM() answers:
“What is the total value accumulated so far?”

Type of Calculation

  • Table calculations

  • Cumulative (running) calculations

  • Order-dependent aggregations

  • Trend and growth analysis

RUNNING_SUM() is evaluated after aggregation and is controlled by sorting, partitioning, and table calculation direction.

Practical Use Cases

  • Tracking cumulative sales, revenue, or profit

  • Monitoring growth over time

  • Creating progress-to-goal metrics

  • Building running balance or backlog views

  • Supporting rate and average calculations when combined with other functions


RUNNING_SUM(expression)

ParameterTypeDescription
expressionAggregate / table calculationThe numeric expression to sum cumulatively. Must be aggregated in the view.

How It Works?

Mathematical / Logical Principle

For each row n, RUNNING_SUM() computes:

RUNNING_SUM = Σ(values from row 1 to row n)

Conceptually, it performs a rolling accumulation that expands forward as each new row is evaluated.

Example Formula

RUNNING_SUM(SUM([Sales]))

Calculates cumulative sales over the sorted view

What Does It

  • Data Type: Numeric (same type as the expression)

  • Meaning:

    • Returns the sum of values from the first row through the current row

    • The value monotonically increases or stays constant (unless negative values exist)

Example Output

RowValueRUNNING_SUM()
1100100
2200300
3150450

When Should We Use It?

Use RUNNING_SUM() when you need to:

  • Track accumulation over time

  • Measure progress or growth

  • Analyze cumulative impact

  • Build running balance or milestone dashboards

  • Provide context for trend-based decision making

Basic Usage

Running total of a measure


RUNNING_SUM(SUM([Sales]))

Displays cumulative sales values

Column Usage

Running sum by date


RUNNING_SUM(SUM([Profit]))

Tracks profit accumulation over time

Calculate cumulative average


RUNNING_SUM(SUM([Sales])) / RUNNING_COUNT(SUM([Sales]))

Produces a running average using two running functions

Advanced Usage

Progress-to-goal calculation


RUNNING_SUM(SUM([Sales])) / WINDOW_SUM(SUM([Sales]))

Shows cumulative progress as a percentage of total sales

Running sum within partitions


RUNNING_SUM(SUM([Sales]))

(with Compute Using set per Region)

Calculates independent cumulative totals per region

Tips and Tricks

  • Always define sorting, especially for time-based views

  • Verify Compute Using to control accumulation direction

  • Combine with RUNNING_COUNT() or RUNNING_AVG() for derived metrics

  • Incorrect sorting leads to misleading results

  • Not usable in row-level or LOD expressions

Related Functions

Functions commonly used alongside or as alternatives to RUNNING_SUM():

  • RUNNING_AVG()

  • RUNNING_COUNT()

  • RUNNING_MAX()

  • RUNNING_MIN()

  • WINDOW_SUM()

  • PREVIOUS_VALUE()

We’ve got plenty of resources to help you master Tableau functions. For more details, check out the official Tableau documentation. Or, if you’re ready for more practice, let’s dive into related functions and build your Tableau skills further!

If you’re ready to harness the full power of Tableau and elevate your data analytics capabilities, our expert Tableau consulting services are here to guide you. Whether you need support with building advanced calculated fields, creating dynamic visual dashboards, or optimizing your data sources for peak performance, our team of experienced Tableau consultants delivers customized solutions designed for your business needs. Visit our Tableau Consulting page to discover how we can help your organization turn data into impactful, insight-driven decisions.

1. What does RUNNING_SUM() do in Tableau?

It calculates the cumulative total of a measure from the first row to the current row.

2. Is RUNNING_SUM() affected by sorting?

Yes, sorting determines the order in which values are accumulated.

3. Is RUNNING_SUM() a table calculation?

Yes, it is evaluated after aggregation and depends on the view layout.

4. Can RUNNING_SUM() decrease?

Only if negative values are included in the data.

5. How is RUNNING_SUM() different from WINDOW_SUM()?

RUNNING_SUM() accumulates progressively, while WINDOW_SUM() calculates a sum over a fixed window.