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
The formula returns the remainder after dividing 10 by 3 which is 1.
Step 2: Similarly, add another Text label control and set its Text property to the following powerapps formula.
Power Apps Formula
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
The output of the formula is 13.
We can use the Max function with Sharepoint List also.
Power Apps Formula
This formula computes the maximum of all the values of the column 'Teacher salary' in the data source ‘Teachers Data’.
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
The output of the formula is 8.
We can use the Min function with the sharepoint list.
Power Apps Formula
This formula computes the minimum of all the values of the column 'Teacher salary' in the data source ‘Teachers Data’.
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
We can also use the Average function with the sharepoint list.
Power Apps Formula
This formula computes the average of all the values of the column 'Teacher salary' in the data source ‘Teachers Data’.
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
Power Apps Formula
This formula computes the sum of all the values of the column 'Teacher salary' in the data source ‘Teachers Data’.
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
This formula computes the sum of the values resulting from the 'Teacher salary' - Expenditure calculation across all rows in the dataset.