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

Notifications

Announcements

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,351 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard