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 / Count number of rows i...
Power Apps
Answered

Count number of rows in current gallery view.

(3) ShareShare
ReportReport
Posted on by 16

Is there a way to count rows in the current gallery view. 

With COUNTROWS, I can count total rows in my SharePoint List but I just want to count number of rows currently present in the gallery (i.e. after I have applied my filters).

Any help would be well appreciated

 

Categories:
I have the same question (0)
  • Verified answer
    BitLord69 Profile Picture
    914 on at

    Just call CountRows with Gallery.AllItems, like this: 

     

    CountRows(gMyGallery.AllItems)

    Good luck!

  • Meneghino Profile Picture
    6,949 on at

    Fully agree with @BitLord69, but just be careful with paging.

    A gallery will only load the first 100 items initially and will load the next batch of 100 items if you scroll down to the end of the current list.  It will do this four times to retrieve a maximum of 500 items.

    At least this was true about a month ago when I last checked.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Bitlord. Question: How do you count based per a value ? Each item in my gallery has a status field, pending or done. I would like to count only the pending ones.

    Thanks

  • AK7 Profile Picture
    16 on at

    Hi Babulau,

    Use CountRows(Filter(GalleryComponent.AllItems,(Status = "Pending")))

    GalleryComponent is the gallery name.
    Status is the column name

     

    Best,
    Ak

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This can be abbreviated to CountIf(GalleryComponent.AllItems, Status = "Pending")

  • BKICK Profile Picture
    57 on at

    Just ran into this problem today. Is there anyway to get around this?

     

  • CS-08081740-0 Profile Picture
    2 on at
    Try using Gallery.AllItemsCount

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