cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JiriS
Helper III
Helper III

Sum of Gallery

Hi,

 

I build my app and I need to do sum of items in gallery (5k rows). So I use CountRows(Gallery.AllItems) , but it works only for first 100 rows. I also cannot use CountRows(MyDataSource) because it is not delegable.

 

What should I do?

 

Thanks,

George

8 REPLIES 8
eka24
Super User
Super User

Check your delegation setting is smaller so GoTo File.... Advance Settings and increase it to 2000

 

I will go for CountRows (Datasource) or create a collection and use CountRows(CollectioName)

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

My delegation limit is already 2000. 

Create a collection and use

CountRows(CollectioName)

The reason is that Gallery loads in batches so counting could be misleading at some point in time.

 

I must say that 5000 .rows cannot be delegated. 

Check on how to Use collection as a workaround https://powerusers.microsoft.com/t5/Building-Power-Apps/ClearCollect-for-more-than-2000-records/td-p...

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

mdevaney
Super User
Super User

@JiriS 
Maybe you could build a Flow to calculate the SUM and return the value to PowerApps.  I'm not equipped to show you how that's done, I just know its possible.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

But how to sum number of rows in my dataset? Is there some options?

If you want to use a flow, check a video from Audrey

https://youtu.be/IOG0AecA6xE

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

goDynamic
Helper I
Helper I

Hi,

 

You may try this in Power Automate. 

 

Check the link for flow configuration

https://powerusers.microsoft.com/t5/General-Power-Automate/How-to-get-a-count-of-the-number-of-rows-...

 

Thanks

Thank you for your ideas!

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 (1,938)