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)
| Parameter | Type | Description |
|---|---|---|
| expression | Aggregate / table calculation | The 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
| Row | Value | RUNNING_MAX() |
|---|---|---|
| 1 | 100 | 100 |
| 2 | 80 | 100 |
| 3 | 120 | 120 |
| 4 | 110 | 120 |
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 analysisIncorrect 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.
It returns the highest value encountered so far within a partition.
Yes, sorting determines the order in which values are evaluated.
Yes, it is evaluated after aggregation and depends on the view layout.
No, the running maximum never decreases.
RUNNING_MAX() accumulates progressively, while WINDOW_MAX() calculates a maximum over a fixed window.