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 / Filtered Gallery - Cou...
Power Apps
Unanswered

Filtered Gallery - Count Rows and Sum Column

(0) ShareShare
ReportReport
Posted on by 6

Hi. I have created a simple Powerapp to query a Sharepoint List. The Sharepoint List contains our business spending. I have created a gallery of the Sharepoint List. Which I can filter using to 2 date pickers (from and to) and a combobox (contains categories of expenditure).

 

I am trying to calculate the total number of transactions for the period - CountRows(Gallery1.AllItems) and total expenditure - Sum(Gallery1.AllItems, cost).

 

The results only show the first 100 rows. You then have to scroll the gallery to the end to get the total results.

 

I have also tried to create a collection - ClearCollect(ListResults, Gallery1.AllItems) of the filtered gallery and use this in the calculations - CountRows(ListResults). Again this only returns the first 100 rows.

 

The Sharpoint List contains more than 2000 rows ( and growing) and there will always be more than 100 rows in the filtered gallery.

 

Any suggestions please or do I stick with exporting the Sharepoint List to Excel.

 

Thanks

 

 

 

 

Categories:
I have the same question (0)
  • RobElliott Profile Picture
    10,323 Super User 2025 Season 2 on at

    @reddog43 have a read of the blog by @WarrenBelz  which describes how to work with large collections. https://www.practicalpowerapps.com/delegation/power-apps-delegation-sharepoint/#Collections

     

     

     

  • reddog43 Profile Picture
    6 on at

    Thanks Rob. I will have a read.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @reddog43

    CountRows(yourfilteredcollection)

    Sum(yourfilteredcollection, some column) where yourfilteredcollection is the items property of the gallery. 

  • reddog43 Profile Picture
    6 on at

    Hi Drrickryp

    Have I got this wrong but Collect and ClearCollect are not delegatable. So will only return the data row limit. Max being 2000.

    Thanks

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @reddog43

    Yep, that is the issue. Solve that problem first as per @RobElliott 's suggestion. Gallery.AllItems isn't the solution. 

  • reddog43 Profile Picture
    6 on at

    Ok Thanks

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @reddog43 

    Bookmark @WarrenBelz 's blog.  It is a resource that you will frequently come back to since you are using SharePoint.

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 739 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 268

Last 30 days Overall leaderboard