Tableau Funtion: WINDOW_MIN( )

Tableau Function: WINDOW_MIN( )

Category: Table Calculation Functions

What Is the Function?

The WINDOW_MIN() function in Tableau is a table calculation that returns the minimum value of an expression within a defined window of rows in a partition.

In simple terms, WINDOW_MIN() answers:
“What is the lowest value within this specific window?”

Unlike RUNNING_MIN(), which accumulates progressively from the first row to the current row, WINDOW_MIN() allows you to define a custom window range for evaluating the minimum.

Type of Calculations

  • Table calculations

  • Window-based aggregations

  • Minimum value calculations

  • Order-dependent analytics

It evaluates the minimum value within a specified window relative to the current row.

Practical Use Cases

  • Creating rolling minimum values

  • Identifying local troughs or dips

  • Comparing current value to nearby lows

  • Monitoring downside risk in financial data

  • Detecting threshold breaches within time windows


WINDOW_MIN(expression, [start, end])

ParameterTypeDescription
expressionAggregate / table calculationNumeric expression whose minimum will be evaluated. Must be aggregated.
start (optional)IntegerStarting row offset relative to the current row.
end (optional)IntegerEnding row offset relative to the current row.

How It Works?

Mathematical / Logical Principle

  1. Collect values within defined window

  2. Evaluate minimum among those values

Conceptually:

WINDOW_MIN = MIN(values within specified window)

The window is defined relative to the current row using offsets.

Return Value

  • Data Type: Numeric (same as expression)

  • Meaning:

    • Returns the minimum value within the defined window

    • May vary for each row depending on window boundaries

When Should We Use It?

Use WINDOW_MIN() when you need to:

  • Calculate rolling minimums

  • Identify local lows or troughs

  • Compare values against nearby minimum benchmarks

  • Analyze downside trends

  • Create threshold-based alerts

Basic Usage

Full partition minimum


WINDOW_MIN(SUM([Sales]))

Returns the overall minimum Sales value

Column Usage

3-period rolling minimum


WINDOW_MIN(SUM([Sales]), -2, 0)

Evaluates current row and previous two rows

Centered rolling minimum


WINDOW_MIN(SUM([Sales]), -1, 1)

Evaluates previous, current, and next rows

Advanced Usage

Compare value to rolling minimum


SUM([Sales]) - WINDOW_MIN(SUM([Sales]), -2, 0)

Shows how far current value is above recent low

Dynamic window size with parameter


WINDOW_MIN(
SUM([Sales]),
-[Window Size],
0
)

Enables interactive rolling minimum analysis

Tips and Tricks

  • Always verify Compute Using settings

  • Define proper sorting (especially for time series)

  • Combine with WINDOW_MAX() to analyze ranges

  • Window exceeding partition boundaries adjusts automatically

  • Partition size directly affects results

Related Functions

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

  • RUNNING_MIN()

  • WINDOW_MAX()

  • WINDOW_AVG()

  • WINDOW_SUM()

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

It returns the minimum value within a defined window of rows.

2. How is WINDOW_MIN() different from RUNNING_MIN()?

WINDOW_MIN() uses a custom window range, while RUNNING_MIN() accumulates progressively.

3. Is WINDOW_MIN() affected by sorting?

Yes, sorting determines the order of rows within the window.

4. Can WINDOW_MIN() be used for rolling analysis?

Yes, by specifying row offsets.

5. What happens if the window exceeds partition boundaries?

Tableau automatically adjusts the window to stay within the partition.