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 Pages - Power Apps Portals
Under review by Community Managers

Under review

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

Sort Drop Down - Error - The "Sort"part of this formula might not work correctly on large data sets

Posted on by
I am currently using power apps. I am utilizing a vertical gallery and I have also included a sort drop down. The sort drop down has the following items" ContentViews, ContentRating and ContentUploadDate. I want to be able to sort by each item in descending order. I used the below formula and it seems to only work for one at a time. When I tried to include for content rating and content upload date. It shows error. When I replace the contentviews with contentrating or upload date. It works. But I want to be able to sort by either of the 3. When I include the 3 items for the sorting it doesn't work. It shows delegation warning: The "Sort"part of this formula might not work correctly on large data sets. I would kindly appreciate some help
 
Sort(
    Filter(
    FinanceContentTables,
    (IsBlank(drpTransformationArea.Selected.Value) ||
    'Transformation Area' = drpTransformationArea.Selected.Value)
    && (IsBlank(drpTechnologyplatform.Selected.Value) ||
    'Technology Platform' = drpTechnologyplatform.Selected.Value)
    && (IsBlank(drpTechnologydetails.Selected.Value) ||
    'Technology Details' = drpTechnologydetails.Selected.Value)
    && (IsBlank(drpFinanceprocess.Selected.Value) ||
    FinanceProcess = drpFinanceprocess.Selected.Value)
    && (IsBlank(drpFinanceOrganization.Selected.Value) ||
    FinanceOrganization = drpFinanceOrganization.Selected.Value)
    && (IsBlank(drpComptencylevel.Selected.Value) ||
    CompetencyLevel = drpComptencylevel.Selected.Value)
    && (IsBlank(drpContenttype.Selected.Value) ||
    ContentType = drpContenttype.Selected.Value)
),
If(
        drpSort.Selected.Value = "ContentViews",
        ContentViews,
        If(
            drpSort.Selected.Value = "ContentUploadDate",
            ContentUploadDate,
            If(
                drpSort.Selected.Value = "ContentRating",
                ContentRating,
                ContentViews // Default to ContentViews if none match
            )
        )
    ),
    If(
        drpSort.Selected.Value = "ContentViews" ||
        drpSort.Selected.Value = "ContentRating" ||
        drpSort.Selected.Value = "ContentUploadDate",
        SortOrder.Descending,
        SortOrder.Ascending // Default sort order if none of the above match
    )
)
Gallery with Sort Dropdown.png

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Pages

#1
Hammed Profile Picture

Hammed 22

#2
Lucas001 Profile Picture

Lucas001 21 Super User 2026 Season 1

#3
CN-06091549-0 Profile Picture

CN-06091549-0 18

Last 30 days Overall leaderboard

Featured topics