Skip to main content

Notifications

Community site session details

Community site session details

Session Id : WPma9OP1yZpCOf4t2/7DGS
Power Apps - Building Power Apps
Answered

Count number of rows in current gallery view.

Like (3) ShareShare
ReportReport
Posted on 7 Nov 2017 01:26:49 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:
  • CS-08081740-0 Profile Picture
    2 on 08 Aug 2024 at 17:40:55
    Count number of rows in current gallery view.
    Try using Gallery.AllItemsCount
  • BKICK Profile Picture
    57 on 04 May 2022 at 16:31:21
    Re: Count number of rows in current gallery view.

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

     

  • Community Power Platform Member Profile Picture
    on 31 Jul 2020 at 21:49:23
    Re: Count number of rows in current gallery view.

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

  • AK7 Profile Picture
    16 on 09 Nov 2018 at 19:28:03
    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

  • Community Power Platform Member Profile Picture
    on 21 Aug 2018 at 13:42:44
    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

  • Meneghino Profile Picture
    6,949 on 07 Nov 2017 at 09:06:50
    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.

  • Verified answer
    BitLord69 Profile Picture
    914 on 07 Nov 2017 at 07:33:27
    Re: Count number of rows in current gallery view.

    Just call CountRows with Gallery.AllItems, like this: 

     

    CountRows(gMyGallery.AllItems)

    Good luck!

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard