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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / (Sum(ProjectsGallery_2...
Power Apps
Unanswered

(Sum(ProjectsGallery_2.AllItems,) only working on scroll down

(0) ShareShare
ReportReport
Posted on by

HI All, 

 

We are hoping someone has some tips for us. We have developed a Projects Gallery that references our SQL database. 

 

We have label that  references the projects gallery and sums the items based on filters. 

 

It works except it only sums what is immediately present in the gallery box onscreen. We need to scroll to the bottom of the galley for the sum to be correct. It is filtering Correctly.

 

The code we have used in the label. 

 

Text(Round(Sum(ProjectsGallery_2.AllItems,'FY Budget'),0),"[$-en-US]$0#,###")

 

Does anyone know what code to add so the sum occurs without the requirement for scroll down in the gallery to load all the data?

 

Thanks

Categories:
  • WarrenBelz Profile Picture
    156,530 Most Valuable Professional on at

    Hi @dataanalytics ,

    I am suspecting that your query does the normal thing and bring back 100 items at a time. If your filter brings back less than 2,000 items, you can sum the same filter as the gallery, but beyond that Sum() is not delegable directly on a dataset.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • shoog Profile Picture
    2,164 on at

    The AllItems property of gallery controls only holds the visible content at first, so it's not a good practise to reuse it to sum it's contents.

    Your best option is to replace ProjectsGallery_2.AllItems with the code from the Items property of ProjectsGallery_2, which probably references a datasource or collection.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard