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

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,972)