web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Orderby on aggregate query (alias required)

(0) ShareShare
ReportReport
Posted on by 25

Hi there,

I am trying to apply an orderby to an aggregate query and am getting the following error message back:

{"error":{"code":"0x80041134","message":"An alias is required for an order clause for an aggregate Query."}}

I understand what the error message is saying but am unclear on how to actually resolve the issue. Here is an example of the query:

.../incidents?$filter=statecode eq 0&$groupby((statuscode), aggregate($count as total))&$orderby=statuscode desc

Regards,
Andy

I have the same question (0)
  • Suggested answer
    Modesto Iacopino Profile Picture
    on at

    Hello Andy,

    please have a look in the following:

    Query Data using the Web API (Microsoft Dataverse) - Power Apps | Microsoft Docs

    There are a lot of example that can help you to build your query correctly.

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans