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