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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Sorting on calculated ...
Power Pages
Unanswered

Sorting on calculated filed is not working in power apps portal

(0) ShareShare
ReportReport
Posted on by 121

Hello Experts,

 

I have calculated filed (Datatype: Whole Number) named 'week number' in one of my entity in CDS. in that calculated filed I am pulling the 'week key' from another entity(DimWeek), and I am pulling that calculated filed in one of the view which is used in Entity list to display data on the web page.

 

I want to sort the records in the entity list on the basis of calculated field 'week number' (descending), but when I am sorting records on that field the entity list is not getting sorted, but when I tried sorting the entity list on the other field it is getting sorted.

it seems strange to me,

 

What was wrong with that field I am not sure.

 

any quick help on this is really appreciable!!

 

please check the below screen shot in which we have sorted the records in the view both way (smaller to larger / larger to smaller)

Larger to Smaller.

sorting 2_censored.jpg

 

Smaller to Larger

sorting 1_censored.jpg

 

Regards,

Pranesh 

Categories:
I have the same question (0)
  • justinburch Profile Picture
    Microsoft Employee on at

    Hi @praneshJ,

    This most likely falls under the limitations defined here: https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/calculated-rollup-attributes#limitations

    Limitations

    You can’t use values in calculated attributes that reference a related entity, another calculated attribute, or a logical value in the same entity to sort data returned by a query. Although your query can specify that the results should be ordered using a calculated attribute, the sort direction will be ignored and will not throw an error. If the calculated attribute references only simple values in the same record, sorting works normally. You can determine the sources used in a calculated field using the SourceTypeMask property on the attribute metadata. More information: Logical attributes

    Only attributes from an immediate parent entity can be used in a calculated attribute.

    Saved queries, charts, and visualizations can have a maximum of 10 unique calculated attributes.

    Calculated attributes can reference other calculated attributes in their formula, but they can’t reference themselves.

    Calculated attributes don’t have values when a user with Dynamics 365 for Outlook is offline.

    MaxValue and MinValue metadata properties can’t be set on calculated attributes

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 47 Super User 2026 Season 1

#2
sannavajjala87 Profile Picture

sannavajjala87 16 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 14 Super User 2026 Season 2

Last 30 days Overall leaderboard