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

Show number of items in a gallery based on text in SP column

(1) ShareShare
ReportReport
Posted on by 321

Hello,

 

I have a gallery linkining to my SP list, which contains a choice 'Status' column. The three choices are 'Not Started, 'In Progress' and 'Complete'.

 

The idea is I will then be able to have another label to show % of complete.

 

I have a label (outside of the gallery) to count all rows in the SP list.

 

What id like is another label that shows the number of rows in my 'Status' column that are marked 'Complete'.

 

How would I achieve this?

 

Thanks

Jamie

Categories:
I have the same question (0)
  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on at

    @JimboSeyon the labels text properly use

     

    CountRows(Filter(your data source,Status.Value = “completed”))

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • SoPatt Profile Picture
    Microsoft Employee on at

    CountIf(MySPList,Status="Complete")

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @JimboSey 

    Since you already have the values in your Gallery, there is no need to go back to the datasource to count information.  In fact, that will reduce performance on your app as it is doing "yet another" data interaction.

     

    So, set your label based on the values you already have in the Gallery.

    Ex.

       CountRows(yourGallery.AllItems)

    This will provide the count of records in your gallery.

       CountRows(Filter(yourGallery.AllItems, Status.Value = "Complete"))

    This will provide the count of records marked as complete (assuming the Status column is a choice column).  If it is not a choice column and is a text column, then change to:

       CountRows(Filter(yourGallery.AllItems, Status = "Complete"))

     

    I hope this is helpful for you.

  • JimboSey Profile Picture
    321 on at

    This worked great, thanks @RandyHayes 

  • Community Power Platform Member Profile Picture
    on at

    On my side, I have a problem on the display of the number of people in my gallery when I use CountRows(yourGallery.AllItems).


    When I apply a filter, it shows me the right number, but when my list is displayed in full (more than 800 people) it shows me only 100 people in the counter, which increases by 100 if I scroll enough.

    the display of the number of columns is limited to 100 if I don't scroll, no matter what I do.


    How can I solve this problem ?

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard