PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (2024)

PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (1)

In this PowerApps Tutorial, We will discuss what is PowerApps Sum function, What are Sum function syntaxes in Powerapps, and how to get sum of a column in PowerApps.

Also, By taking some simple scenarios, We will cover these below topics that are related to the PowerApps Sum function as:

  • What is PowerApps sum datatable column
  • How to do PowerApps sum column values
  • How to work with PowerApps sum column in collection
  • What is PowerApps sum gallery
  • PowerApps sum SharePoint column or How to sum the SharePoint Column in PowerApps
  • PowerApps find max value in column
  • PowerApps max value syntax
  • What does the mean of PowerApps sumif

PowerApps Sum function

  • Sum function in PowerApps, is a type of function that helps to calculate the sum of its arguments.
  • For example, suppose I will supply the values for the PowerApps Sum function as Sum(10, 20, 30) then the output returns as 60.
  • Below represents the PowerApps Sum function syntax as:

Syntax-1:

Sum( NumericalFormula1, [ NumericalFormula2, ... ] )

Where,

NumericalFormula(s) = You need to specify some numeric values that you wants to perform the sum operation.

Syntax-2:

Sum( Table, NumericalFormula )

Where,

  1. Table = Specify the Data source that you want to operate on. The Data source may be a SharePoint Online List, Excel spreadsheet, etc.
  2. NumericalFormula = Here, you can specify the column of the table (Data source) that you want to perform with the sum operation.

Example:

  • I have a SharePoint Data source named Products. This list has a Quantity column (Number Data type) and Price column (Number Data type) as like the below screenshot:
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (2)
  • Here what I want to do is, I want to multiply both the column values (Quantity and Price) and display the total sum values in a PowerApps Label input control.
  • For that, Insert a Label control and apply this below formula on its Text property as:
Text = Sum(Products, Quantity*Price)

Where,

  1. Products = SharePoint Online list
  2. Quantity and Price = Number column from the SharePoint list
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (3)

Once you will apply the formula, the total sum value will display in the Label control as like the above screenshot.

Some important Points to remember while using PowerApps Sum function:

  • Whenever you are using the Average, Max, Min, and Sum function in PowerApps, it can be delegated when used with a data source that supports delegation for these functions.
  • Whenever you are trying to use these types of functions in Powerapps, a delegation warning will display that will remind you of the limitation and to suggest switching to delegable alternatives where possible.
  • To overcome the Powerapps Delegation issue, you can extend the Data row limit. Go to File tab -> Settings -> Advanced settings -> Make the Value as 2000 under the Data row limit for non-delegable queries. For more further queries about the Delegation, you can refer to this link: PowerApps Delegation

PowerApps sum datatable column

Here in this example, we will see how to work with the PowerApps sum datatable column.

  • On the PowerApps screen, I have a Powerapps Data table that contains some records. That data table records are retrieving from the SharePoint list named Bank Depositor Info.
  • This Data table has these many below columns:
  1. Title (Depositor Name)
  2. Transaction Type
  3. Date
  4. Amount

Below screenshot represents the PowerApps Data table:

PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (4)

NOTE:

In case you want to format the Amount number as Currency in the Powerapps Data table, then you can follow this link: How to format number as currency in PowerApps
  • Next, I want to sum the data table column Amount based on deposit or withdrawal by Date to get the total amount of money deposited or withdrawn. That means, whenever I will choose any particular date, then it will display the total amount of details of that specified date.
  • To do this, I will explain to you two different ways that you can follow as:

If you want to provide the date as manually like “2020-10-01“, then follow this below things:

  • Insert a Label control and apply this below formula on its Text property as:
Text = Sum(Filter('Bank Depositor Info', Date=Date(2020,10,11)), Amount)

Where,

  1. ‘Bank Depositor Info’ = SharePoint list Data source
  2. Date = This is the Date picker column that I have created in the SharePoint list
  3. Date(2020,10,11) = It is the function that we need to specify a manual date
  4. Amount = This is the column that we want to calculate the total value
  • Once you will apply the above formula, then you can see the total amount (of that specified manual date) will display in the Label control as shown below.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (5)
  • Sum by Deposit/Withdrawal Date (Using a Date picker):
  • Suppose you have a PowerApps Date Picker control and you want to select a particular date from that date picker. When you will select a particular date, then the total amount will display in a Label control (of that selected date).
  • For this, Select the Label control and apply this below formula on its Text property as:
Text = Sum(Filter('Bank Depositor Info', Date=DatePicker1.SelectedDate), Amount)

Where,

DatePicker1 = Date picker control name

PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (6)
  • Save and Preview (F5) the app. Select any date from the date picker control, then you can see the total amount value (of that selected date) in the Label control as shown in the below screenshot.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (7)

PowerApps sum column values

In this below scenario we will learn how to sum a column values using Powerapps.

  • I have a PowerApps Data table that filters a SharePoint list using the Powerapps Combobox control. That means, when I will choose a name from the Combobox control, it filters and displays the details in the Data table as shown below.
  • Also, I want a Label control that will display the total number of Amount that presents in the Data table. As I filtered three records, So there are three individual amounts displays in the data table i.e. “5000”, “7000” and “3000”.
  • So what formula would I use in a label control, so the total amount will display as “15000”.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (8)
  • To work with this scenario, you can apply this below formula on Label’s Text property as:
Text = Sum( Filter( 'Bank Depositor Info', Title in ComboBox1.SelectedItems ), Amount)

Where,

  1. ‘Bank Depositor Info’ = Data source name (SharePoint list name)
  2. Title = This is the Sharepoint column that I used to filter reference in the Combobox control.
  3. ComboBox1 = Combobox control name
  4. Amount = This is the SharePoint column that I want to calculate the total value

You can refer to the below screenshot.

PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (9)
  • Now Save and Preview the app. Select any title or name from the Combobox control.
  • Once you will select the name, then the specific user details will add on the PowerApps table. Then you can see all the user’s total amount will appear in the Label control as shown below.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (10)

PowerApps sum column in collection

This below scenario describes how a user can work with the Powerapps sum column in Powerapps collection. Here, We will see two different types of scenarios as:

  1. PowerApps Sum of a Collection
  2. PowerApps Sum of a Collection with conditions
  1. PowerApps Sum of a Collection:
  • I have a PowerApps Collections named priceCollection. This collection is having all the records from a SharePoint list named Products.
  • The Powerapps collection will create when a user will click on the button (PowerApps Sum Column in Collection) as shown below.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (11)
  • As in this below screenshot, you can see the PowerApps collections (priceCollection). Here, I want to sum all of the numbers that are present under the Price column.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (12)
  • To work with this scenario, I have taken a Label control and applied this below formula on its Text property as:
Text = Sum(priceCollection, Price)

Where,

  1. priceCollection = Powerapps Collection name
  2. Price = This is the column that you want to sum all of the numbers from the Powerapps collection itself
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (13)
  • When you will Save and preview the app, you can see the total price (from the Collection) will display in the Label control.

2. PowerApps Sum of a Collection with conditions:

  • So in the previous example, we saw the PowerApps Sum of a Collection without any conditionality. Here in this scenario, We will learn how to work with the sum of a Powerapps collection with conditions.
  • The condition is, How to SUM a column of a Collection depending on other values within the Powerapps Collection.
  • The below screenshot represents a PowerApps collection named amountCollection. All the records are coming from a Sharepoint list.
  • This Powerapps Collection has a column named Transaction Type that is having two different types of transactions as “Deposit” and “Withdrawal“.
  • Here, I would like to be able to SUM all the Amounts of Deposit and Withdrawal separately. That means the total amount for Deposit should be 23000 and 10000 for Withdrawal.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (14)
  • To find out the solution, you can use a Dropdown control and a filter should be used within the sum function.
  • Insert a Dropdown control and provide all the Transaction type values on its Items property as like the below screenshot.
  • Add a Label control (that will help you to display the total amount from the collection) and set its Text property as:
Text = Sum( Filter( amountCollection, TransactionType = ddTransactionType.Selected.Value ), Amount)

Where,

  1. amountCollection = Powerapps Collection name
  2. ddTransactionType = Dropdown control name
  3. Amount = This is the column that you want to calculate the total value from the Powerapps collection (depending upon the Transaction type)
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (16)
  • Save and Preview the app. When you will select Deposit from the Transaction Type dropdown control, the total amount (of Deposit only) will appear in the Label control.
  • Similarly, When you will select Withdrawal from the Transaction Type dropdown control, the total amount (of Withdrawal only) will appear in the Label control as shown below.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (17)

PowerApps sum gallery

Now we will learn how we can calculate sum of the value in a PowerApps Gallery Control.

  • I have a PowerApps collection (priceCollection) that is having all the records from a SharePoint list data source. Refer to the below screenshot.
  • First of all, I want to multiply the Price and Quantity column from the collection and store the value in another column named ExtendedPrice. Also, I want to display all the customer details and the Extended price in a gallery control.
  • After multiplying all the value from the Collection, I want to calculate the grand total price of all customers, and the total price will display in a Label control. Follow the below steps that we need to do.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (18)
  • At first, Insert a Gallery control and apply this formula on its Items property as:
Items = AddColumns( priceCollection, "ExtendedPrice", Quantity * Price)

Where,

  1. AddColumns = Powerapps AddColumns is a function that helps to add a column to a table.
  2. priceCollection = Powerapps Collection name
  3. “ExtendedPrice” = This is the new column that I have added where it will store the multiply value (of quantity and price column)
  4. Quantity, Price = These are the columns (from Powerapps Collections) that I want to multiply
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (19)
  • Next, Take a Gallery control and set its Layout to “Title, subtitle, and body“.
  • Select a Label control from the Gallery control and set its Text property as:
Text = ThisItem.ExtendedPrice
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (20)
  • Once you will save and preview the app, you can see all each multiplied value will display in the Gallery control as shown below.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (21)
  • Next, suppose you want to display the grand total of extended price outside of the Gallery. Then, in that case, Insert a Label control and apply this below formula on its Text property as:
Text = Sum(Gallery3.AllItems, ExtendedPrice)

Where,

  1. Gallery3 = Powerapps Gallery control name
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (22)
  • When you will preview the app, you can see the grand total value will appear in the Label control.

In this below example, We will learn how to work with PowerApps Sum function using a SharePoint list column.

  • I have a SharePoint Online list named Bank Depositor Info. This list has these many below columns and records. Among all the records, I want to calculate the total amount of a Depositor Name whose name is Preeti. Simply, We can say it will only sum of Preeti’s total amount.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (23)
  • Also, on the Powerapps screen, I have a Data table that is having all the records from the SharePoint list data source (“Bank Depositor Info”).
  • Another Label control is there that will help to display the total amount of Preeti.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (24)
  • Select the Label control and apply this below formula on its Text property as:
Text = Sum(Filter('Bank Depositor Info', Title = "Preeti"), Amount)

Where,

  1. ‘Bank Depositor Info’ = SharePoint list name
  2. Title = This is the SharePoint list column (Depositor name) that helps to filter the name as Preeti
  3. Amount = This is the column that I want to calculate the total value
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (25)
  • When you will preview the app, then you can see the total amount of preeti in the Label control as like above screenshot.

PowerApps find max value in column

PowerApps Max function helps to find the maximum value. It can find the maximum of all values from any data sources like SharePoint list, Excel spreadsheet, etc.

PowerApps Max value Syntax

Below represents the Powerapps Max value syntaxes:

Syntax-1:

Max( NumericalFormula1, [ NumericalFormula2, ... ] )

NumericalFormula(s) = Specify some numeric values that you wants to perform the Max operation.

Syntax-2:

Max( Table, NumericalFormula )
  1. Table = Specify the Data source that you want to operate on. The Data source may be a SharePoint Online List, Excel spreadsheet, etc.
  2. NumericalFormula = You can specify the column of the table (Data source) that you want to perform with the Max operation.

Example:

  • This below is a SharePoint list (Products). It has a column named Delivery Charges (with Number Datatype).
  • Here, I want to find the maximum value or maximum delivery charges using the PowerApps Max function. As 25 is the highest maximum value, So I want to display this value in a Powerapps Label control.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (26)
  • You can see there is a Label control in the Powerapps screen that will help you to display the highest delivery charges value.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (27)
  • Select the Label control and apply this below formula on its Text property as:
Text = Max(Products, 'Delivery Charges')

Where,

  • Products = SharePoint List name
  • ‘Delivery Charges’ = SharePoint column name where I wanted to find out the highest or maximum value
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (28)
  • Also, you can apply this formula on Label’s Text property as:
Text = First(Sort(Products,'Delivery Charges',Descending)).'Delivery Charges'
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (29)
  • Once you will Save and preview the app, you can see the highest or maximum Delivery charges value in the Label control.

PowerApps sumif

Below is an example that how you can work with the PowerApps Sumif function.

  • There is a Data table on the PowerApps screen that is having the records from an Excel spreadsheet data source (Worker Info). You can see there are some columns like Member, Number of Days, Minutes, and Organization.
  • In this scenario, I want to calculate the total sum of minutes of individual members. That means, When I will select the member name as Preeti, then the total sum of minutes (of Preeti only) will display in a Label control.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (30)
  • I have a Powerapps Combobox control that helps to display the member names from the Excel sheet. As the Excel sheet is having a repeated name and though we do not need to display the repeated name in Combobox, So I provided the distinct value to the Combobox control as:
Items = Distinct(WorkerInfo.Member,Member)
  • Just make disable or toggle off to the Allow multiple selections option from the Combobox Properties pane (select Combobox control -> Properties -> Allow multiple selections). If you will disable it, then the Combobox will allow only a single value or member.
  • Once you will apply this above formula, then you can see the distinct member in the Combobox control (by clicking on the dropdown).
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (31)
  • Next, as I wanted to calculate the total minutes of individual members and display it in a Label control, apply this below formula on Label’s Text property as:
Text = Sum( Filter( WorkerInfo, Member = ComboBox2.Selected.Result ), Minutes)

Where,

  1. WorkerInfo = Excel spreadsheet name
  2. Member = This is the column that is having all the member names (present in the Excel sheet)
  3. ComboBox2 = Combobox control name
  4. Minutes = This is the column that I want to calculate the sum value (present in the Excel sheet)
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (32)
  • Save and Preview the app. Select a Member from the Combo box control. When you will select, then the total minute value (of that selected member) will display in the Label control as shown below.
PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (33)

Also, you may like these below PowerApps Tutorials:

  • PowerApps upload file to SharePoint document library
  • PowerApps Get Current User (ID, EMail, Department, Location, Photo, etc)
  • PowerApps send email on submit
  • PowerApps Email Attachment Control – How to Use
  • PowerApps Microphone Control – How to use
  • How to Create Login Screen in PowerApps
  • PowerApps Popup message Box with Examples
  • Get users from SharePoint Group in PowerApps
  • PowerApps: Submit data to two SharePoint Lists
  • PowerApps Patch Function with examples
  • PowerApps set field value based on another field

In this PowerApps Tutorial, We discussed what is PowerApps Sum function and what are the Sum function syntaxes in Powerapps.

Also, we learned with these below topics as:

  • How to get the sum of a column in PowerApps
  • What is PowerApps sum datatable column
  • How to do PowerApps sum column values
  • How to work with PowerApps sum column in collection
  • What is PowerApps sum gallery
  • PowerApps sum SharePoint column or How to sum the SharePoint Column in PowerApps
  • PowerApps find max value in column
  • PowerApps max value syntax
  • What does the mean of PowerApps sumif

PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (34)

Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site EnjoySharePoint.com

PowerApps Sum function (Get sum of a column PowerApps) - SPGuides (2024)

FAQs

How do I create a calculated field in PowerApps? ›

Create a calculated column
  1. Sign into Power Apps.
  2. Expand Data > Tables.
  3. Open the table you want, select the Columns area, and then select Add Column.
  4. Provide the required information for the column, including the Display name, Name, and Data type.
Jun 22, 2022

How do I sum a column in Sharepoint? ›

Enable the Totals feature for a column
  1. Create a new view or modify an existing view.
  2. Scroll down to Totals and click on the plus sign.
  3. Select the value you want to calculate from the dropdown to the right of the column that should have the Totals.
  4. Click OK.

What is the use of sum and Max function? ›

The Max function finds the maximum value. The Min function finds the minimum value. The Sum function calculates the sum of its arguments.

Can PowerApps do calculations? ›

You can use formulas not only to perform calculations and change appearance but also to take action. For example, you can set the OnSelect property of a button to a formula that includes the Navigate function. When a user selects that button, the screen that you specify in the formula appears.

How do I use Countif in power app? ›

countif syntax PowerApps
  1. Table = It is required. Specify the table that you need to be count all the records within it.
  2. LogicalFormula = This is also required. Specify the formula to evaluate for each record of the table. Records that return true for this formula are counted.
Apr 20, 2021

How do you create a calculated field? ›

Add a calculated field

Click the PivotTable. This displays the PivotTable Tools, adding the Analyze and Design tabs. On the Analyze tab, in the Calculations group, click Fields, Items, & Sets, and then click Calculated Field. In the Name box, type a name for the field.

What are calculated fields? ›

A calculated field is a field that uses existing database fields and applies additional logic — it allows you to create new data from your existing data. A calculated field either: performs some calculation on database fields to create a value that is not directly stored in the database or.

What are formulas in power apps? ›

On this page you will find a categorized list of 150+ Power Apps functions with links to the official documentation.
...
Math Functions.
AbsAbsolute value of a numbernumber
SqrtReturns the square root of a numbernumber
SumCalculates the sum of a table expressionsourceexpression
13 more rows

How do you sum a column in power automate? ›

Calculate the Sum for a SharePoint column in Power Automate - YouTube

How do you sum in power automated? ›

The standard method to sum an array in Power Automate generally follows this pattern:
  1. Define a variable to hold the total.
  2. Get an array of items.
  3. Loop through the array of items.
  4. For each iteration of the loop, increment the total variable by the current array item in the loop.
Jun 1, 2021

How do I show a Calculated column in SharePoint list? ›

You can find the totals option in the small arrow next to each column.
  1. The problem we are encountering is that the column you need to sum is a calculated column, and it does not have a sum option. ...
  2. The function in the test sum is set like this, select the concat function, and then select PAYMENTS TOTAL:
Sep 8, 2020

What is the purpose of MIN () and MAX () aggregate function? ›

The SQL MIN() and MAX() Functions

The MIN() function returns the smallest value of the selected column. The MAX() function returns the largest value of the selected column.

What is Max Min count AVG and sum function? ›

The SQL language is used to interact with that database information.
...
SQL Aggregate Functions — AVG, COUNT, DISTINCT, MAX, MIN, SUM.
functionreturns
MAX()the largest-value element in the column
MIN()the smallest-value element in the column
SUM()the arithmetic total of all values in the column
3 more rows
Apr 19, 2021

How sum average and count function works? ›

Using functions
  1. SUM: This function adds all the values of the cells in the argument.
  2. AVERAGE: This function determines the average of the values included in the argument. ...
  3. COUNT: This function counts the number of cells with numerical data in the argument.

How do I add a column to a collection in PowerApps? ›

Go to the PowerApps Collections page -> Select the new Collection name (Product Description and Price). Once you will select the collection, you can see the Product Price column has been added to the collection as shown below.

How do I add commas to numbers in PowerApps? ›

How to Format Number with Comma in Power Apps Form? - YouTube

How do I use PowerApps filter? ›

Filtering with choice columns
  1. Open a blank app.
  2. Add a new screen by selecting the New Screen option.
  3. On the Insert tab, select Gallery and then select Vertical.
  4. On the Properties tab of the right-hand pane, open Data Source and then select Accounts.
  5. (Optional) In the Layout list, select different options.
Jul 8, 2022

What is Delegation warning in PowerApps? ›

To make it easier to know what is and isn't being delegated, Power Apps provides warning (yellow triangle) when you create a formula that contains something that can't be delegated. Delegation warnings appear only on formulas that operate on delegable data sources.

Top Articles
Latest Posts
Article information

Author: Horacio Brakus JD

Last Updated:

Views: 5965

Rating: 4 / 5 (71 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Horacio Brakus JD

Birthday: 1999-08-21

Address: Apt. 524 43384 Minnie Prairie, South Edda, MA 62804

Phone: +5931039998219

Job: Sales Strategist

Hobby: Sculling, Kitesurfing, Orienteering, Painting, Computer programming, Creative writing, Scuba diving

Introduction: My name is Horacio Brakus JD, I am a lively, splendid, jolly, vivacious, vast, cheerful, agreeable person who loves writing and wants to share my knowledge and understanding with you.