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

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,025)