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

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

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard