Notifications
Announcements
I have a SharePoint List with the Title field populated with the following data format:
24-1000.01
24-1000.02
24-1001.01
24-1002.01
24-1002.02
24-1002.03
The first thing I am trying to do with this data is use the GroupBy and Left functions to look at the 7 leftmost characters, then display a list of unique values in a gallery. So, the results would be:
24-1000
24-1001
24-1002
Try this on your gallery.
Distinct(DataSource, Left(Title, 7))
@metalproswi - one example:
DropColumns( GroupBy( AddColumns( 'Your Table, "metalproswi_custom_column", Left( Title, 7 ) ), "metalproswi_custom_column", "GroupedItems" ), "GroupedItems" )
Please note the GroupBy function is not delegable.
Hi @metalproswi ,
Please try this.
Distinct(Left(ListName.Title,7),Value)
Best regards,
Rimmon
I tried the 'Distinct' and 'DropColumns' suggestions, however non worked in my gallery. I will try recreating my gallery from a basic app to rule out any other variables.
I can't get past a logic error after entering the data source.
@metalproswi:
"metalproswi_custom_column" is a random name I gave to the newly added column. You can use any name you want.
DropColumns( GroupBy( AddColumns( '2024 MP Lot Records', "title_custom", Left( Title, 7 ) ), "title_custom", "GroupedItems" ), "GroupedItems" )
Further reading on the AddColumns function:
https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-table-shaping
I am using an empty column in my SharePoint List, but I can't get past the generic 'invalid arguments' message. I will read up more on the AddColumns function.
@metalproswi - please could you use the code I provided. At present you're trying to do something else (using the Distinct function is not part of my suggestion).
Sorry about that. I was trying several things. The formula is no longer erroring; however the data is not displaying correctly.
My data set is like this:
And I would like to display it like this:
This is the what the current output is displaying like:
@metalproswi - that is a completely different format than the one you asked for in your first post. You're going to need to create a Nested Gallery for that.
https://www.youtube.com/watch?v=25_bdexevGk
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 721 Most Valuable Professional
Michael E. Gernaey 320 Super User 2025 Season 2
Power Platform 1919 268