cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Count number of rows in current gallery view.

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Participant
Power Participant

Re: Count number of rows in current gallery view.

Just call CountRows with Gallery.AllItems, like this: 

 

CountRows(gMyGallery.AllItems)

Good luck!

View solution in original post

5 REPLIES 5
Highlighted
Power Participant
Power Participant

Re: Count number of rows in current gallery view.

Just call CountRows with Gallery.AllItems, like this: 

 

CountRows(gMyGallery.AllItems)

Good luck!

View solution in original post

Highlighted
Community Champion
Community Champion

Re: Count number of rows in current gallery view.

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.

Highlighted
Helper I
Helper I

Re: Count number of rows in current gallery view.

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

Highlighted
Frequent Visitor

Re: Count number of rows in current gallery view.

Hi Babulau,

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

GalleryComponent is the gallery name.
Status is the column name

 

Best,
Ak

Highlighted
Advocate I
Advocate I

Re: Count number of rows in current gallery view.

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,654)