Tableau Funtion: MIN

Tableau Function: MIN

Category: Number Functions

The MIN() function in Tableau is a mathematical and aggregate function used to return the smallest (minimum) value from a set of numbers, dates, or strings.

It can be used in two ways:

  1. Aggregate mode – to find the smallest value within a group of data.

  2. Row-level comparison mode – to compare two expressions and return the smaller of the two.

Purpose

The main purpose of the MIN() function is to:

  • Identify the lowest numeric or date value within a dataset or between two expressions.

  • Simplify comparisons and threshold analysis.

  • Find earliest dates, lowest sales, minimum prices, or smallest KPIs in dashboards.

Type of Calculations It Performs

  • Category: Aggregate / Row-level

  • Function Type: Mathematical and comparison function

  • Supported Data Types: Numeric, Date, and String

Practical Use Cases

  • Finding the lowest sales in a region or time period.

  • Determining the earliest date in a dataset.

  • Comparing two numeric fields (e.g., Budget vs. Actual).

  • Identifying the minimum KPI value for benchmarking.

  • Finding the smallest cost, duration, or risk score in analytics.


MIN(expression)
MIN(expression1, expression2)

ParameterTypeDescription
expressionNumeric, Date, or String (scalar, column, or aggregated)The field or expression from which Tableau finds the minimum value.
expression1Numeric, Date, or StringThe first value or field to compare.
expression2Numeric, Date, or StringThe second value or field to compare.

How It Works?

The MIN() function works by evaluating two or more expressions and returning the lowest value based on data type rules:

  • Numeric Example: MIN(5, 10)5

  • Date Example: MIN(#2023-04-10#, #2023-01-01#)#2023-01-01#

  • String Example: MIN("Apple", "Orange")"Apple" (alphabetically smallest)

Mathematical Logic:

What Does It Return?

  • Type: Same as input data type (Number, Date, or String).

  • Meaning: Returns the smallest (minimum) value of the provided expressions or dataset.

  • Behavior:

    • Returns the smaller of two values if both are provided.

    • Returns the smallest value within the dataset when only one expression is given.

    • Returns NULL if all compared values are NULL.

When Should We Use It?

Use the MIN() function when you need to:

  • Identify the lowest or earliest value in your dataset.

  • Compare two values and select the smaller one.

  • Find the earliest event date or lowest performance metric.

  • Filter data based on minimum thresholds.

  • Compute bottom-performing segments for analysis.

Basic Usage


MIN(10, 25)

Result: 10
Explanation: Returns the smaller of the two numbers.

Column Usage


MIN([Sales])

Description: Returns the smallest sales value in the dataset or within a partition.

RegionSalesMIN([Sales])
North50002000
South20002000
East30002000

Comparing Two Fields


MIN([Actual Sales], [Target Sales])

Description: Compares actual vs. target and returns whichever is smaller.

ProductActualTargetMIN(Actual, Target)
A120015001200
B500040004000
C300030003000

Finding the Earliest Date


MIN([Order Date])

Description: Returns the earliest order date in your dataset.

Advanced Example – Conditional Logic


IF [Sales] = MIN([Sales]) THEN [Product Name] END

Explanation: Identifies the product(s) with the lowest sales.

Combining with Other Functions


MIN(SUM([Profit]), AVG([Profit]))

Explanation: Compares total profit with average profit and returns the smaller.

Tips and Tricks

  • Use MIN() with dates to find earliest events or record timestamps.

  • Works well with IF statements for conditional highlighting.

  • Use MIN() inside LOD expressions for more granular control:
    { FIXED [Region] : MIN([Sales]) }

  • Combine MIN() with WINDOW_MIN() for moving or window-based calculations.

  • If data contains NULL, ensure proper handling with ZN() to avoid unintended NULL results.

  • Mixing data types (e.g., string and number) in the same MIN() call causes an error.

Related Functions You Might Need

FunctionPurpose
MAX()Returns the maximum (largest) value.
AVG()Calculates the average value of a field.
SUM()Returns the total sum of values.
WINDOW_MIN()Finds the minimum value within a moving window or partition.
ZN()Converts NULL values to zero for safer numeric calculations.

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 the MIN function do in Tableau?

It returns the smallest value among fields, expressions, or within a dataset — including numbers, dates, or strings.

2. Can MIN() be used with strings?

Yes, it returns the lexicographically smallest string, e.g., “Apple” < “Banana”.

3. What happens if all values are NULL?

MIN() returns NULL if no valid data points are found.

4. What’s the difference between MIN() and WINDOW_MIN()?

MIN() returns the smallest value in the entire field or between expressions, while WINDOW_MIN() calculates it over a defined table window.

5. Can MIN() be combined with other Tableau functions?

Yes, it can be combined with IF, LOD, or ZN() to create robust analytical expressions and conditional logic.