Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

Group by Owner/OwningTeam

Hi all,


I am struggling to use the group by operator in a list rows connect. How do I correctly adress the
field containing the owning userid or username. What is different when the owner is a team?



I have tried OwningUser OwningUSer/systemuserid and other variations as well in the group by operator and
always get error messages. In my case the owner is always a team.




Solution Sage
Solution Sage

Hi @OlafStetzer ,


For your scenario where owner is teams then use 


groupby((owningteam),aggregate(<fieldname> with aggregate(sum,max,min) as 'Alias Name'))



Thanks for offering help. I got a step further but still get error messages. Sorry, I probably would know how to do that in SQL but the odata syntax is still a big mystery to me and I do not find good and easy to understand documentation on dataverse (which version of entity or column name or relationship table is need when etc....).

This is what I get so far: 

"$apply": "groupby((owningteam),aggregate($count as Count))"

leads to error message:

$apply/groupby grouping expression 'owningteam' must evaluate to a property access value.


"$apply": "groupby((owningteam/name),aggregate($count as Count))"

 leads to error message:

'Team' entity doesn't contain attribute with Name = 'ownerid' and NameMapping = 'Platform'.


Maybe I shall explain in more depth what I want to accomplish:
I have a dataverse table where I create several new entries with different owning teams (in that same flow).
At the end I want to generate one email per Owning team (to all Team members) with a list of the new entries I generated in that flow. 
I am struggling at point one where I want to create a list of distinct Team Names for the list of new entries.
This I want to use subsequently to filter the list of previously generated entries by Owning Team.
But maybe there is a much simpler way of getting the whole task done.

Solution Sage
Solution Sage

Hi @OlafStetzer ,


In aggregate transformation text box just use : 


groupby((owningteam),aggregate(<fieldname> with aggregate(sum,max,min) as 'Alias Name'))

field name is schema name .

i.e. groupby((owningteam),aggregate(prefix_name with Count as 'Alias Name'))


Community Support
Community Support

Hi @OlafStetzer ,
was using groupby function suggested by ManishJain was helpful?

Helpful resources

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,542)