cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AK7
Level: Powered On

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
BitLord69
Level 10

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

4 REPLIES 4
BitLord69
Level 10

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
Meneghino
Level 10

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.

Babalaul
Level: Powered On

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

AK7
Level: Powered On

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

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (5,001)