Syntax of the MIN Function
The syntax of the MIN function in Power BI DAX is as follows:
Here, `❰ColumnName❱` represents the name of the column from which we want to retrieve the smallest value.
Let's take a look at some examples to understand the usage of the MIN function.
Example 1: Retrieve the Smallest Value from a Column
Suppose we have a table named 'Sales' with the following data:
| Product | Sales |
| A | 100 |
| B | 200 |
| C | 150 |
| D | 300 |
We want to retrieve the smallest value from the 'Sales' column. To do this, we will use the following DAX formula:
This will return the value '100' as it is the smallest value in the 'Sales' column.
Example 2: Retrieve the Smallest Value from a Filtered Column
Suppose we want to retrieve the smallest value from a filtered column. To do this, we can use the following DAX formula:
MINX(FILTER(Sales, Sales[Product] = “A”), Sales[Sales])
Here, we are using the MINX function instead of the MIN function as we are filtering the 'Sales' table based on the 'Product' column. We are filtering the table for the product 'A' and then retrieving the smallest value from the filtered 'Sales' column.
The MIN function in Power BI DAX is a powerful tool that helps to retrieve the smallest value from a given column. It is a useful function that helps to analyze data and make informed decisions. We hope this article has helped you understand the syntax and usage of the MIN function. Try it out in your next Power BI project and see how it can help you make better decisions.
Power BI DAX Training Courses by G Com Solutions (0800 998 9248)
Power BI DAX Intensive Training Course£1,050.00 – £26,550.00
Power BI DAX Introduction£395.00 – £9,750.00
Power BI DAX Intermediate£395.00 – £9,750.00
Power BI DAX Advanced£395.00 – £9,750.00