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 / GroupBy not working on...
Power Apps
Unanswered

GroupBy not working on list items

(0) ShareShare
ReportReport
Posted on by 2
I have a list of Asset assignments and I want to display this as grouped by their location.  Creating a view directly on the list works fine,  displaying all Assets in my list works fine, however when using GroupBy in powerapps gallery there are groups missing.  These are always the same groups.
 
The list has 1033 items the missing groups are at ID=783 and 782,  and at ID=953 and 955,  so they are not consistently at the end of the list. 
 
Does anybody have any advice on what may be happening here please.
I have the same question (0)
  • SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 on at
    Hi  
     
    Check for Null/Blank Values: Ensure there are no blank or null values in the field you're using to group the data
    GroupBy(Filter(AssetAssignments, !IsBlank(Location)), "Location", "GroupedAssets")
     
    Force Data Refresh: Try refreshing the data source before performing the GroupBy 
    Refresh(AssetAssignments);
     
    Sort the data by the location before applying the GroupBy function
    GroupBy(Sort(AssetAssignments, Location, Ascending), "Location", "GroupedAssets")
     
    pls try
     
    thanks
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at
    Hi @lbrown,
    It would be helpful to post (in Text) the code you are using, however I suspect here that you have your Data Row Limit set at 500 and as GroupBy is a "local" operation, it will only Group the first 500 records.
  • lbrown Profile Picture
    2 on at
    Thank you for your help - it was a little bit of both,  
     
    Data Row Limit has been changed to 2000
     
    Changing the order of Sort and GroupBy did the rest :
     
    My original selection was :  
    Sort(Search(GroupBy(Assets,Location,Service_Department,DATA),HomeSearch.Text,Location,Service_Department),Location,SortOrder.Ascending)
     
    New working one :
    Search(GroupBy(Sort(Assets,Location,SortOrder.Ascending),Location,Service_Department,DATA),HomeSearch.Text,Location,Service_Department)
     
    Many Thanks
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at
    Hi @lbrown,
    I am not sure how sorting by Location solved any data query issue, however the Data Row Limit would have been the reason for the missing records.

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard