Dax Function: MIN

Category: Aggregation functions

The MIN function in Power BI is a DAX (Data Analysis Expressions) function used to return the smallest value from a column or a set of scalar values. It is a straightforward aggregation function that is widely used in numerical or date-related data analysis.

Purpose:

  • To identify the smallest (minimum) value in a column or among a list of values.
  • Useful for comparisons, thresholds, or identifying the lowest data point.

Type of Calculations:

  • Simple aggregations that return the lowest numeric or date value.

Practical Use Cases:

  1. Finding the Earliest Date: Identify the first transaction or event date in a dataset.
  2. Thresholds or Limits: Determine the minimum threshold value in a dataset.
  3. Highlighting the Smallest Values: Useful for ranking or highlighting low-performing metrics.

MIN(<column>)</column>

ParameterTypeDescription
columnColumnThe column containing the data to evaluate. Must contain numeric or date values.

 

How Does MIN Dax Function Works?

  1. Column Scanning: The MIN function scans all rows in the specified column.
  2. Value Comparison: It compares each value to identify the smallest.
  3. Return: The smallest value is returned as the output.

What Does It Return?

The MIN function returns a scalar value representing the smallest value in the specified column. The return type depends on the column’s data type:

  • Numeric columns: Returns the smallest number.
  • Date columns: Returns the earliest date.
  • Empty columns: Returns BLANK.

When Should We Use It?

  • Data Validation: Check for the lowest or earliest value in a dataset.
  • Key Performance Indicators (KPIs): Highlight metrics like the lowest sales figure or earliest transaction date.
  • Conditional Logic: Use as a basis for comparisons or setting thresholds.

Examples

Basic Usage

Find the smallest value in a column Sales[Revenue]:


MinRevenue = MIN(Sales[Revenue])

Output: Returns the smallest revenue value from the Revenue column.

Column Usage

Find the earliest transaction date in a Sales table:


EarliestTransaction = MIN(Sales[TransactionDate])

Result: Returns the earliest date from the TransactionDate column.

Advanced Usage

Combine with a conditional calculation to find the smallest revenue in a specific region:


MinRegionRevenue = MINX(FILTER(Sales, Sales[Region] = "East"), Sales[Revenue])

Result:Finds the minimum revenue for the “East” region.

Tips and Tricks

  • Data Type Consistency: Ensure the column has numeric or date data to avoid errors.
  • Combine with Filters: Use in conjunction with FILTER to narrow down results.
  • Avoid Empty Columns: The function returns BLANK if the column contains no values.

Performance Impact of MIN DAX Function:

  • Efficient for Small Datasets: MIN performs well on columns with fewer rows or pre-aggregated data.
  • Optimizations for Large Datasets: Use filtered or summarized tables to avoid unnecessary calculations.

Related Functions You Might Need

  • MAX: Returns the largest value in a column.
  • MINX: Returns the minimum value of an expression evaluated over a table.
  • AVERAGE: Calculates the average value of a column.
  • COUNT: Counts the rows in a column.

Want to Learn More?
For more information, check out the official Microsoft documentation for MIN. You can also experiment with this function in your Power BI reports to explore its capabilities.

If you’re looking to unlock the full potential of Power BI and take your data insights to the next level, our expert Power BI consulting services are here to help. Whether you need assistance with implementing advanced DAX functions like the ones discussed here, creating interactive dashboards, or optimizing your data models for better performance, our team of seasoned Power BI consultants is ready to provide tailored solutions for your business. Visit our Power BI Consulting page to learn more about how we can empower your organization with data-driven decisions.

1. What does the MIN function do in Power BI?

The MIN function returns the smallest numeric or date value from a specified column.

2. Can the MIN function handle text values?

No, the MIN function only works with numeric or date values. For text, consider sorting or using functions like FIRSTNONBLANK.

3. How is MIN different from MINX?

MIN operates on a single column, while MINX evaluates a calculated expression across a table.

4. What happens if the column is empty?

If the column contains no values, the function returns BLANK.

5. Can I use the MIN function with filtered data?

Yes, combine MIN with FILTER or similar functions to evaluate specific subsets of data.