cancel
Showing results for
Did you mean:
Highlighted
Level: Powered On

## How to sum numeric fields inside a browsegallery

I need to know how to add the price that is inside the browsegallery as seen in the photo and insert the result of the sum into a label

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: How to sum numeric fields inside a browsegallery

You could take use of the Sum function here.

For example, the formula of the BrowseGallery Items property  is the following:

SortByColumns(Filter('Testing list', StartsWith(SText, TextSearchBox1.Text)), "SText", If(SortDescending1, Descending, Ascending))

Then under the Count total Label Text property, the sum formula for the Number field should be:

Sum(Filter('Testing list', StartsWith(SText, TextSearchBox1.Text)),

Number

)

Adding the code suggested by @Meneghino:

Sum(BrowseGallery1.AllItems,

Precio)

Which should be better.

Average, mAX, mIN, stdevP, Sum, and Varp functions in PowerApps

If you need any further assistance on this, please post back.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
Community Support Team

## Re: How to sum numeric fields inside a browsegallery

You could take use of the Sum function here.

For example, the formula of the BrowseGallery Items property  is the following:

SortByColumns(Filter('Testing list', StartsWith(SText, TextSearchBox1.Text)), "SText", If(SortDescending1, Descending, Ascending))

Then under the Count total Label Text property, the sum formula for the Number field should be:

Sum(Filter('Testing list', StartsWith(SText, TextSearchBox1.Text)),

Number

)

Adding the code suggested by @Meneghino:

Sum(BrowseGallery1.AllItems,

Precio)

Which should be better.

Average, mAX, mIN, stdevP, Sum, and Varp functions in PowerApps

If you need any further assistance on this, please post back.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level 10

## Re: How to sum numeric fields inside a browsegallery

As an alternative you can also use Gallery1.AllItems, so something like Sum(Gallery1.AllItems.Precio)

Level: Powered On

## Re: How to sum numeric fields inside a browsegallery

The formula that worked for me was:

Sum(BrowseGallery3.AllItems;Body2_2)

thanks you so much for help me!!

Level: Powered On

## Re: How to sum numeric fields inside a browsegallery

Hi there,

The solution works fine, but I have an issue when I add a new element to the gallery. (I have a Form that creates a new task and adds it to a gallery - source sharepoint-)

The new task shows in the gallery and in the source, but the label where I have the formula     Sum(ProjectTasksGal.AllItems,Total_Task_Price)

Any hint is welcome!

Announcements

#### 'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

#### Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

#### Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

#### Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

#### Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

#### Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,388)