How to calculate sum of gallery items in Power Apps?

In this Power Apps tutorial, we will discuss how to calculate sum of gallery items in Power Apps. To calculate the sum of the Power Apps gallery items, we are going to use the PowerApps Sum() function.

Recently, I was working in a canvas app in Power Apps, where we were displaying items from a SharePoint list using a gallery control. Here we have the requirement to calculate the total of a column in the gallery control.

Like, we have a Total Price column, and we wanted to display the total of that column.

To meet this requirement, the following steps are:

Calculate the sum gallery items in Power Apps

Let us understand, how to calculate the sum of the gallery items within the Power Apps. That is, we will use Power Apps to calculate the sum of the gallery items based on the quantity and price.

Requirement:

The total price of each product will be calculated in the gallery based on the respective order quantity. After that, it will calculate the sum of the gallery items’ total prices.

PowerApps sum gallery items
PowerApps sum gallery items

Here, we have a SharePoint list named Orders list having some different types of columns such as:

  • Title: Default
  • Order Date: Date and time
  • Order Qty: Number
  • Manufacturer: Choices
  • Price: Currency
powerapps how to sum a gallery items
PowerApps how to sum a gallery items

To fulfill the requirement, now we will create a vertical gallery within the Power Apps screen and connect that vertical gallery to the SharePoint data source. For this, the following steps are:

  • On the Power Apps Canvas app, go to Add Data > Connect the SharePoint list.
  • On the screen, click on the Insert > Vertical gallery.
  • Connect the gallery with the SharePoint list i.e., Orders list.
  • Now the gallery will display the columns that were retrieved from the SharePoint list.
How to sum a gallery items in Power Apps
How to sum gallery items in Power Apps
  • Now, we’ll add a new column to the data source that will calculate the total price of each product based on the quantity of the order. For this, insert the below expression on the gallery’s Items property.
Items = AddColumns('Orders List', "Total Product Price",'Order Qty'* Price)

Where,

  1. Orders List‘ is the name of the SharePoint list.
  2. “Total Product Price” is the name of the new column to store the calculated value.
  3. Order Qty and Price are the names of the columns of the SharePoint list.
Power Apps how to sum a gallery items
Power Apps how to sum a gallery items
  • Let’s display that evaluation in the gallery. For that, add a label control into the gallery and insert the below expression in the label’s Text to display the new column’s values.
Text = ThisItem.'Total Product Price'
How to sum gallery items within PowerApps
How to sum gallery items within PowerApps
  • Finally, we will calculate the sum of the total products’ prices and display that total value within the gallery.
  • For this, add a label control and insert the below expression on the label’s Text property.
Text = "Total Price =  " & Sum(Gallery1.AllItems,'Total Product Price')

Where Gallery1 is the name of the PowerApps vertical gallery. Once the formula is applied, the sum value will display within the screen’s label.

How to sum a Power Apps gallery column items
How to sum a Power Apps gallery column items

This is how to calculate the sum of gallery items within Power Apps.

Conclusion

From this Power Apps Tutorial, we learned how to calculate the sum of Power Apps gallery items.

You may also like the following Power Apps tutorials:

>
SPGUIDES.ACADEMY
LEARN. BUILD. TRANSFORM.
â–¶ Live FREE Webinar

Build an AI-Powered
Invoice Processing
App

Learn how to build an intelligent invoice processing solution using:

S SharePoint
â—† Power Apps
➤ Power Automate
✦ Copilot Studio
PDF INVOICE
→
AI
→
◆ ➤ S
From Invoice
to Insights
Invoice Processing ↑ Upload Invoice
INVOICE
TOTAL $1,950.00
Extracted Information
Vendor Name Contoso Ltd.
Invoice Number INV-1001
Invoice Date 09/05/2026
Due Date 09/25/2026
Line Items
Laptop 2 $1,600.00
Mouse 5 $150.00
✓ Save to SharePoint
â–£
DATE 22nd September 2026
â—·
TIME 10:00 AM EST 7:30 PM IST
⌛
DURATION 60 Minutes
🚀 Save Your Free Seat ›

Live Webinar

SharePoint Integration Power Apps Form With Repeating Table [Invoice Management System]

Learn how to build a real-world Invoice Management System using a SharePoint Integration Power Apps Form with a repeating table—supporting multiple invoice line items.

📅 2nd September 2026 – 10:00 AM EST | 7:30 PM IST

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…