web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to sum numeric fie...
Power Apps
Answered

How to sum numeric fields inside a browsegallery

(1) ShareShare
ReportReport
Posted on by 54

 

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

 

Sin título.png

Categories:
I have the same question (0)
  • Verified answer
    v-micsh-msft Profile Picture
    on at

    Hi @jdelacrettaz,

     

    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.

    96.PNG

    Adding the function reference:

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

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

    Regards,

    Michael

  • Meneghino Profile Picture
    6,949 on at

    Hi @jdelacrettaz

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

  • jdelacrettaz Profile Picture
    54 on at

    The formula that worked for me was:

    Sum(BrowseGallery3.AllItems;Body2_2)

    thanks you so much for help me!!

     

  • Enz0 Profile Picture
    4 on at

    Hi there, 

    @v-micsh-msft , 

    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)

    Doesn´t add the new task to the total... don´t know why!!!

     

    Any hint is welcome!

    Thanks in advace!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard