In this blog, we will demonstrate how to calculate the sum of the gallery items within Power Apps. In other words, we’ll use Power Apps to compute the sum of the gallery items depending on item and item 2 showing below.

We have a SharePoint list called Colorpicks with a variety of columns, including:

We will now build a vertical gallery within the Power Apps screen and link that vertical gallery to the SharePoint data source in order to meet the requirement. The stages for this are as follows:

  Go to Add Data > Link the SharePoint list in the Power Apps Canvas app.
  On the screen, select Insert > Vertical gallery.
  Link the gallery to a SharePoint list, such as the Colorpicks.
  The columns that were retrieved from the SharePoint list will now be displayed in the gallery.

We’ll now add a new column to the data source that calculates the total item of each value based on the amount item 2. Insert the following expression into the gallery’s Items property to accomplish this.

AddColumns(ColorPicks, “totals”, item*’item 2′)

Let’s put that evaluation on display in the gallery. Add a label control to the gallery and enter the expression below in the label’s Text to display the values of the new column.

ThisItem.totals

  Lastly, we will add up all of the items and display the entire worth in the gallery.
  To accomplish this, add a label control and enter the expression below into the label’s Text property.

“Total= ” & Sum(Gallery4.AllItems,totals)

For Any Help or Queries Contact us on info@crmonce.com or +918096556344