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 / 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,426 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard