Tableau Funtion: RUNNING_MAX( )

Tableau Function: RUNNING_MAX( )

Category: Table Calculation Functions

Purpose

The RUNNING_MAX() function in Tableau is a table calculation that returns the maximum value encountered so far within a partition. For each row, it evaluates all values from the first row up to the current row and returns the highest value seen to that point.

In simple terms, RUNNING_MAX() answers:
“What is the highest value reached so far?”

Type of Calculations

  • Table calculations

  • Cumulative (running) calculations

  • Order-dependent comparisons

  • Trend and peak analysis

Like other RUNNING_* functions, RUNNING_MAX() is evaluated after aggregation and depends on sorting and table calculation direction.

Practical Use Cases

  • Tracking record highs over time

  • Identifying peak performance trends

  • Monitoring cumulative maximums (e.g., highest sales to date)

  • Comparing current values to historical highs

  • Creating benchmark or reference lines in dashboards


RUNNING_MAX(expression)

ParameterTypeDescription
expressionAggregate / table calculationThe numeric expression whose running maximum will be calculated. Must be aggregated in the view.

How It Works?

Mathematical / Logical Principle

For each row n, RUNNING_MAX() computes:

RUNNING_MAX = MAX(values from row 1 to row n)

It is conceptually similar to applying a rolling maximum that only expands forward.

Example Formula

RUNNING_MAX(SUM([Sales]))

Returns the highest Sales value reached up to each point

What Does It Return?

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

  • Meaning:

    • Returns the maximum value from the first row through the current row

    • The value is non-decreasing across rows

Example Output

RowValueRUNNING_MAX()
1100100
280100
3120120
4110120

When Should We Use It?

Use RUNNING_MAX() when you need to:

  • Identify cumulative peak values

  • Track all-time highs

  • Compare current performance to historical bests

  • Analyze growth ceilings or performance plateaus

  • Create milestone or record-breaking indicators

Basic Usage

Running maximum of a measure


RUNNING_MAX(SUM([Sales]))

Displays the highest Sales value reached so far

Column Usage

Track highest profit to date


RUNNING_MAX(AVG([Profit]))

Useful for performance monitoring over time

Difference from running maximum


SUM([Sales]) - RUNNING_MAX(SUM([Sales]))

Shows how far the current value is below the peak

Advanced Usage

Flag new record values


IF SUM([Sales]) = RUNNING_MAX(SUM([Sales]))
THEN "New Record"
ELSE "Below Peak"
END

Highlights record-breaking points

Running max within partitions


RUNNING_MAX(SUM([Sales]))

(with Compute Using set per Category)

Tracks peaks independently per group

Tips and Tricks

  • Always define sorting explicitly

  • Best used with time-series or ordered dimensions

  • Combine with RUNNING_MIN() for range analysis

  • Incorrect sorting can distort results

  • Not suitable for row-level or LOD calculations

Related Functions

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

  • RUNNING_MIN()

  • RUNNING_SUM()

  • RUNNING_AVG()

  • WINDOW_MAX()

  • LOOKUP()

  • INDEX()

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_MAX() do in Tableau?

It returns the highest value encountered so far within a partition.

2. Is RUNNING_MAX() affected by sorting?

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

3. Is RUNNING_MAX() a table calculation?

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

4. Can RUNNING_MAX() decrease?

No, the running maximum never decreases.

5. How is RUNNING_MAX() different from WINDOW_MAX()?

RUNNING_MAX() accumulates progressively, while WINDOW_MAX() calculates a maximum over a fixed window.