cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dataanalytics
New Member

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

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

2 REPLIES 2
WarrenBelz
Super User
Super User

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
Solution Supplier
Solution Supplier

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.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,552)