Min

How to Use the Power Fx MinĀ  Function in Power Apps

What is the Power Fx Min Function?

The Power Fx Min function is a powerful feature of Power Apps that is used to return the smallest value in a list of numbers. The function takes a list of numbers as input and returns the smallest value in the list. The syntax for the Power Fx Min function is as follows:


Min(list)


Where `list` is the list of numbers for which you want to find the smallest value.

How to Use the Power Fx Min Function in Power Apps

To use the Power Fx Min function in Power Apps, follow the steps below:

1. Open the Power Apps Studio and create a new app.

2. Add a Data Table control to the app and bind it to a data source.

3. Add a Text Input control to the app and set its Default property to the Power Fx Min function.

4. Set the Items property of the Data Table control to the data source.

5. Add columns to the Data Table control, and set their values to the fields in the data source.

6. Save and publish the app.

7. Test the app to ensure that the Power Fx Min function is working as expected.

Examples of Using the Power Fx Min Function

Let's take a look at some examples of how the Power Fx Min function can be used in Power Apps.

Example 1: Finding the Smallest Value in a Column

Suppose you have a data source that contains a column of numbers, and you want to find the smallest value in that column. You can use the Power Fx Min function to achieve this. Here's how:

1. Add a Text Input control to the app.

2. Set the Default property of the Text Input control to the following formula:


Min(DataSource.Column)


Where `DataSource` is the name of your data source, and `Column` is the name of the column containing the numbers.

3. Save and publish the app.

4. Test the app to ensure that the Power Fx Min function is working as expected.

Example 2: Finding the Smallest Value in Two or More Columns

Suppose you have a data source that contains two or more columns of numbers, and you want to find the smallest value among them. You can use the Power Fx Min function in combination with other functions to achieve this. Here's how:

1. Add a Text Input control to the app.

2. Set the Default property of the Text Input control to the following formula:


Min(If(IsBlank(DataSource.Column1), DataSource.Column2, If(IsBlank(DataSource.Column2), DataSource.Column1, Min(DataSource.Column1, DataSource.Column2))))


Where `DataSource` is the name of your data source, `Column1` and `Column2` are the names of the columns containing the numbers.

3. Save and publish the app.

4. Test the app to ensure that the Power Fx Min function is working as expected.

The Power Fx Min function is a powerful feature of Power Apps that can be used to find the smallest value in a list of numbers. In this article, we have taken a detailed look at the syntax of the function, how to use it in Power Apps, and some examples of its usage. By using the Power Fx Min function, you can develop custom applications that are efficient and easy to use.

Power Apps Training Courses by G Com Solutions (0800 998 9248)