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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Create a Collection wi...
Power Apps
Answered

Create a Collection with Counts and Distinct

(0) ShareShare
ReportReport
Posted on by 10

Hi team,

I have a Sharepoint list and want to know which manager has the most directs in that list:

 

ManagerDirect
MaryPeter
MaryPaul
CarlAlicia
CarlAliah
CarlAndrew

 

My ideal result would look like that because the final result is to show the Representation score (last column) in a gallery.

 

I appreciate ANY hint, support, ideas! Thank you everyone.

 

ManagerCount of directs in the listCount of direct reports (using the O365 function)Representation
Mary2729%
    
Categories:
  • wyattdave Profile Picture
    493 Moderator on at

    Hi @Frau_Mengert,

    you can use the Distinct function to get a collection of unique values.

     

    Then you could add a blank/holder item in the collection that populates the gallery.

    You add additional labels for the totals, but set them to only be visible if the item meets a condition (e.g a tag in the collection item or if it's the max index).

     

    I can draft up a quick demo if you need

    Hope that helps 

     

  • Verified answer
    WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @Frau_Mengert ,

    First and last should work as below

    With(
     {_Items: CountRows(YourDataSample)},
     AddColumns(
     GroupBy(
     YourDataSample,
     "Manager",
     "Data"
     ),
     "Reports",
     CountRows(Data),
     "Percentage",
     CountRows(Data) / _Items * 100
     )
    )

    The second one does not seem to be in your data.

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Frau_Mengert Profile Picture
    10 on at

    "With" did the trick! Appreciate your support @WarrenBelz  !!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard