Notifications
Announcements
Hi All,
Looking for some formula help please. I want to display the name of the person who has been assigned the most number of items in a SP list (most repeated value) . My data is in a collection - had a little joy with First / Distinct but the result is not quite correct so I suspect I'm missing something else, or I'm barking up totally the wrong tree.
Any help greatly appreciated!
Gallery Item Code:
GroupBy(AddColumn(ListName,"PersonTxt",PeasonColumn.DisplayName),"PersonTxt","DATA")
Insert two labels in gallery.
First label text property: ThisItem.PersonTxt
Second Label Text Property: CountRows(DATA)
Thanks but its not quite getting me where I want to be.
I'm just looking for a single label outside of a gallery, which displays the most repeated value in the collection. This gives me a gallery with the counts of each which is fine, but I only want the largest repeated value. I can't seem to sort or extract a single value from the gallery.
In my collection the basic schema is something like:
Item --- Person
1 John
2 John
3 Jane
4 Mike
5 John
I just want a single label that says "John has been assigned the most items"
Cheers!
Take a label outside gallery. set it's text as
Max(Gallery1.AllItems,Title1.Text)
Title1 is the name of the label which contains countrows(DATA)
That provides the number, not the name.
I want the label that says 35 to say 'Alison' (as that's the person with 35 items)
Ok. I finally got it. instead of writing this code in a gallery. Write it on a button. That will create collection. then on the label you can write this lookup that will display name of the person who has highest counts. Also instead of button you can write this collection code on App.OnStart. That way your label will be always updated when you reload the code. And show you whoever has the highest count when you open the app
That's throwing me a few errors - I think your test is using a single line of txt field for the person name ? When I get to the GroupBy section, it will only let me select ID from the collection (which is the only non-complex field in the collection)
My list of people have come directly from a Person field in SharePoint.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 796 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
Power Platform 1919 268