Showing results for 
Search instead for 
Did you mean: 

How to perform and orderby descending of an aggregate for a CDS List action?


It took awhile, but I finally got the correct aggreagtion for my call, but now I want to do an Order By Desc of the Count aggregate, but I'm getting an error:


"status": 400,
"message": "The query node SingleValueOpenPropertyAccess is not supported",
"source": "",
"errors": [],
"debugInfo": "clientRequestId: 3ffb4d54-6610-4cb2-bbe3-0e9a93861ca3"
Community Support
Community Support


Hi @Dlabar ,


It seems that using the fields generated by the aggregation as the basis for sorting is not supported.

Order by field here can only be sorted according to the fields existing in Leads entity.

Count is the value generated during the execution of this action, so it cannot be used during execution.


Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the reply @v-bacao-msft .  Is it documented anywhere that this is not supported?

I am having this same issue. @Dlabar or @v-bacao-msft  can you please provide appropriate query syntax for groupby + orderby. I have attached my current syntax.

Not sure, I usually create the query in the XrmToolBox's FetchXmlBuilder tool, it has an option to convert it to the Power Automate Parameters:



Also, you should probably be asking this as a question, and not add as a comment to another.

Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,139)