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 / Missing data under "Gr...
Power Apps
Unanswered

Missing data under "Groupedby" function

(1) ShareShare
ReportReport
Posted on by 15
Hello, I have a issue that makes me struggled a lot.
 
I have set the OnVisibel property of one of my screens as follow:
 
ClearCollect(
    GroupedItems,
    AddColumns(
        GroupBy(
            Shifts,               // SharePoint list
            ProdID,             // Column to group by
            GroupedData         // Name for the grouped records
        ),
        'Grouped Items', Concat(GroupedData, Text(ProdID) & ": " & Text(Value('Produced CV')), ", "), // Concatenate items in the group
        'Total CV', Sum(GroupedData, Value('Produced CV')),   // Sum of Produced CV for each ProdID
        'Total Slim', Sum(GroupedData, Value('Produced Slim')), // Sum of Produced Slim for each ProdID
        'Total GPA', Sum(GroupedData, Value('Produced GPA'))  // Sum of Produced GPA for each ProdID
    )
)
 
As you can see, I try to group the data by the column "ProdID" in my SharePoint list, and return the sums of different produced products for each ProdID.
 
In my SharePoint list, there are three items that have the same ProdID "241015": one with 10 produced cv, one with 21 produced cv, last one with 20 produced cv.

However, the system only captured the first two items, the sum that my power app returns is only 31.

I created one label to dispaly: 
'Grouped Items', Concat(GroupedData, Text(ProdID) & ": " & Text(Value('Produced CV')), ", "), // Concatenate items in the group
 
I can only see two of "241015" are captured and grouped. 241015:10; 241015:21. The 241015:20 is missing.

My best guess is:the item "241015:20" is created at 241015, but the produced cv was updated at 241016. There might be some unknown issue for the Power App to group all the items.

Could anyone gives me some suggestion or solution? Thx
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at
    I think I know the issue, but it may not be the answer you want. Firstly, there is nothing wrong with your code, however you need to be aware that GroupBy is a "local" operation and the number of records it can address is restricted by your Data Row Limit (maximum 2,000), so Shifts record numbers needs to under this limit. Your issue I believe is that you are not retrieving the full list to group.
    You can run a Delegable function inside GroupBy to either filter and restrict the record numbers or (in the example below) get the newest records.
    ClearCollect(
       GroupedItems,
       AddColumns(
          GroupBy(
             Sort(
                Shifts,
                ID,
                SortOrder.Descending
             ),              
             ProdID,             
             GroupedData        
          ),
          'Grouped Items', 
          Concat(
             GroupedData, 
             Text(ProdID) & ": " & Text(Value('Produced CV')), 
             ", "
          ),
          'Total CV', 
          Sum(
             GroupedData, 
             Value('Produced CV')
          ),
          'Total Slim', 
          Sum(
             GroupedData, 
             Value('Produced Slim')
          ), 
          'Total GPA', 
          Sum(
             GroupedData, 
             Value('Produced GPA')
          )
       )
    )
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee
  • AZ-16101423-0 Profile Picture
    15 on at
    Hello @WarrenBelz 
     
    Thank you! Yes! you are so right! Now things work perfectly!
     
    I added this part into the codes and it saved everything
    ClearCollect(
        FilteredShifts,
        FirstN(
            Sort(Shifts, Modified, SortOrder.Descending), 200
        )
    );


    Love ya so much! 

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard