web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : PNHdMbFvgOwcL2P+kPEtCk
Power Apps - Building Power Apps
Answered

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

Like (1) ShareShare
ReportReport
Posted on 7 Feb 2022 18:37:47 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)
  • Community Power Platform Member Profile Picture
    on 25 Aug 2022 at 10:13:10
    Re: Show number of items in a gallery based on text in SP column

    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 ?

  • JimboSey Profile Picture
    321 on 08 Feb 2022 at 10:11:34
    Re: Show number of items in a gallery based on text in SP column

    This worked great, thanks @RandyHayes 

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 07 Feb 2022 at 18:53:10
    Re: Show number of items in a gallery based on text in SP column

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

  • SoPatt Profile Picture
    Microsoft Employee on 07 Feb 2022 at 18:48:06
    Re: Show number of items in a gallery based on text in SP column

    CountIf(MySPList,Status="Complete")

  • PowerRanger Profile Picture
    3,458 Super User 2024 Season 1 on 07 Feb 2022 at 18:45:36
    Re: Show number of items in a gallery based on text in SP column

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 892 Most Valuable Professional

#2
Power Apps 1919 Profile Picture

Power Apps 1919 356

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 310 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete