Mod, Max, Min, Average, and Sum Powerapps Function

1. Mod function

The Mod function returns the remainder after a number is divided by a divisor.

Power Apps Syntax Mod( Number, Divisor )
• Number - Required. Number to divide.
• Divisor - Required. Number to divide by.
Example: The demonstration of Mod Function in Power Apps.
Step 1: Add a Text label control and set its Text property to the following formula.

Power Apps Formula

Mod(10, 3)

The formula returns the remainder after dividing 10 by 3 which is 1.

Mod function in Canvas Power Apps

Step 2: Similarly, add another Text label control and set its Text property to the following powerapps formula.

Power Apps Formula

Mod(10, 7)
Mod function in Canvas Power Apps

2. Max function

The Max function finds the maximum value. Power Apps Syntax a) First Syntax Max(NumericalFormula1, [ NumericalFormula2, ... ]) b) Second Syntax Max(Table, NumericalFormula)
Example: Add a Text label control on the screen and set its Text property to following power apps formula.

Power Apps Formula

Max(10, 13, 8)

The output of the formula is 13.

Max function in Canvas Power Apps

We can use the Max function with Sharepoint List also.

Power Apps Formula

Max('Teachers Data', 'Teacher salary')

This formula computes the maximum of all the values of the column 'Teacher salary' in the data source ‘Teachers Data’.

Max function in Canvas Power Apps

Delegation Warning: We can see the yellow triangle on the label which specifies the delegation warning. It means the Max function is not delegable in case of sharepoint list as a data source.

3. Min function

The power apps Min function is used to find the minimum value. Power Apps Syntax a) First Syntax Min(NumericalFormula1, [ NumericalFormula2, ... ]) b) Second Syntax Min(Table, NumericalFormula) Example: Add a Text label control and set its Text property to the following power apps formula.

Power Apps Formula

Min(10, 13, 8)
Min function in Canvas Power Apps

The output of the formula is 8.
We can use the Min function with the sharepoint list.

Power Apps Formula

Min('Teachers Data', 'Teacher salary')

This formula computes the minimum of all the values of the column 'Teacher salary' in the data source ‘Teachers Data’.

Min function in Canvas Power Apps

Delegation Warning: We can see the yellow triangle on the label which specifies the delegation warning. It means the Min function is not delegable in case of sharepoint list as a data source.

4. Average function

The Average function is used to calculate the average, or arithmetic mean, of its arguments. Power Apps Syntax a) First Syntax Average( NumericalFormula1, [ NumericalFormula2, ... ] ) b) Second Syntax Average(Table, NumericalFormula)
Example: To calculate the average we can specify some numbers to get their average.

Power Apps Formula

Average(10, 15, 8)
Average function in Canvas Power Apps

We can also use the Average function with the sharepoint list.

Power Apps Formula

Average('Teachers Data', 'Teacher salary')

This formula computes the average of all the values of the column 'Teacher salary' in the data source ‘Teachers Data’.

Average function in Canvas Power Apps

Delegation Warning: We can see the yellow triangle on the label which specifies the delegation warning. It means the Average function is not delegable in case of sharepoint list as a data source.

5. Sum function

The Sum function calculates the sum of its arguments. Power Apps Syntax A) First Syntax Sum(NumericalFormula1, [ NumericalFormula2, ... ]) B) Second Syntax Sum(Table, NumericalFormula)
Example: To calculate the sum, we can specify some numbers to get their sum.

Power Apps Formula

Sum(38, 2, 12)
Sum function in Canvas Power Apps

Power Apps Formula

Sum('Teachers Data', 'Teacher salary')

This formula computes the sum of all the values of the column 'Teacher salary' in the data source ‘Teachers Data’.

Sum function in Canvas Power Apps

Delegation Warning: We can see the yellow triangle on the label which specifies the delegation warning. It means the Sum function is not delegable in case of sharepoint list as a data source.

Add a Text label control and set its Text property to the following powerapps formula:

Power Apps Formula

Sum('Teachers Data', 'Teacher salary'-Expenditure)

This formula computes the sum of the values resulting from the 'Teacher salary' - Expenditure calculation across all rows in the dataset.

Sum function in Canvas Power Apps