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 / count disticnt records...
Power Apps
Answered

count disticnt records from gallery collection

(0) ShareShare
ReportReport
Posted on by 2,249
List 1
 
Reason code
 
ABc
Others
Test1
Test1
 
SO i need to create a gallery and filter distinct record and show the count of items
 
expected output
 
Reason code    Count
ABc                     1
Others                1
Test1                   2
 
Kindly help how to achieve this in blank gallery
I added gallery and added datsource sharepoint list
added two labells
 
Reason code    Count
ABC
Others
Test1
Test1
 
But i do not know hoe to add the count and distinct values in reason code field.Kindly advise
Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    68,707 Most Valuable Professional on at
    I did this by creating a separate collection called 'colDistinct' to hold the distinct values.  That is what I then display in the gallery.  Then for the count label I used the following formula where Testcollect was the original list.
    CountRows(Filter(Testcollect,'Reason code' =ThisItem.Value))

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard