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 / Trying to add Sort to ...
Power Apps
Answered

Trying to add Sort to this Filter Syntax and its not working

(0) ShareShare
ReportReport
Posted on by

I'm trying to add a sort to this syntax on the Item property of a gallery.

 

Current Syntax on Item

 

Filter(
'Org Chart',
'Reporting Manager' = Gallery3_1.Selected.Employee

 

I'm trying to add a sort based off of a column titled "Status" in descending order but it is not taking. Not sure what i'm doing wrong here. See below.

 

SortByColumns(Filter('Org Chart','Reporting Manager' = Gallery3_1.Selected.Employee)), "Status", descending)

Categories:
I have the same question (0)
  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at
    SortByColumns( Filter( 'Org Chart', 'Reporting Manager' = Gallery3_1.Selected.Employee ), "Status", Descending )

     

    The main issue with the original formula was that the "Descending" argument was outside of the SortByColumns function's parentheses. In the corrected formula, "Descending" is included as a third argument within the parentheses, which tells Power Apps to sort the data in descending order based on the "Status" column.

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @punksterz626,

     

    My apologies, I only now saw your response on the previous topic. 

    @Rusk's solution should do the trick 😊.

     

    To add upon Rusk's answer: if the 'status' column is a choice column (no multi-select) you could use the following code:

    Sort(
     Filter( 
     'Org Chart', 
     'Reporting Manager' = Gallery3_1.Selected.Employee
     ), 
     Status.Value, 
     Descending 
    )

     

    I hope this helps!

  • punksterz626 Profile Picture
    on at

    this was the one that ended up working. Thank you.

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard