MIN
Applies to:
Calculated column
Calculated table
Measure
Visual calculation
Returns the smallest value in a column, or between two scalar expressions.
Syntax
MIN(<column>)
MIN(<expression1>, <expression2>)
Parameters
Term | Definition |
---|---|
column | The column in which you want to find the smallest value. |
expression | Any DAX expression which returns a single value. |
Return value
The smallest value.
Remarks
The MIN function takes a column or two expressions as an argument, and returns the smallest value. The following types of values in the columns are counted:
- Numbers
- Texts
- Dates
- Blanks
When comparing expressions, blank is treated as 0 when comparing. That is, Min(1,Blank() ) returns 0, and Min( -1, Blank() ) returns -1. If both arguments are blank, MIN returns a blank. If either expression returns a value which is not allowed, MIN returns an error.
TRUE/FALSE values are not supported. If you want to evaluate a column of TRUE/FALSE values, use the MINA function.
Example 1
The following example returns the smallest value from the calculated column, ResellerMargin.
= MIN([ResellerMargin])
Example 2
The following example returns the smallest value from a column that contains dates and times, TransactionDate. This formula therefore returns the date that is earliest.
= MIN([TransactionDate])
Example 3
The following example returns the smallest value from the result of two scalar expressions.
= Min([TotalSales], [TotalPurchases])
Related content
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho