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 Apps / Power Apps - Problems ...
Power Apps
Unanswered

Power Apps - Problems with Sorting Drop Down

(1) ShareShare
ReportReport
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. 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)
),
ContentViews,               
    If(drpSort.Selected.Value = "ContentViews", SortOrder.Descending)
)
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,969 Moderator on at
    Hi,
     
    You talk about an error but do not share what that was.
     
    please use Code snippets as it helps readability
     
    also a picture would help to make sure we are clear on what you want.
     
    1. When you say you want to Sort by any of the 3, or all, are you saying you want to have 1 or 2 or 3 Sort columns at the same time?
     
    Its all standard stuff, so we need to see the error you get so we can tell you what you are doing wrong, as Sorting by multiple columns is documented clearly.
     
     
  • CU29070919-2 Profile Picture
    on at
    Thanks for your response and suggestion FLMike. As shown in the image below, i am trying to sort the gallery based on contentviews, contentuploaddate and content ratings. I have a dataverse table I am utilizing for the gallery. When I use the formula below for Content Views, it works:
     
    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)
    ),
    ContentViews,               
        If(drpSort.Selected.Value = "ContentViews", SortOrder.Descending)
    )
     
     
    However, when I include the upload date and content rating as shown below, it states (we can't evaluate your formula because of a type error.
     
    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)
    ),
    ContentViews,              
        If(
            drpSort.Selected.Value = "ContentViews", SortOrder.Descending,
    ContentRating,
        If(
            drpSort.Selected.Value = "ContentRating", SortOrder.Descending
     
    ContentUploadDate
        If(
            drpSort.Selected.Value = "ContentUploadDate", SortOrder.Descending
    )
        ))

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

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard