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 / SortByColumns not work...
Power Apps
Answered

SortByColumns not working on multiple columns

(0) ShareShare
ReportReport
Posted on by 56

My Sharepoint List gallery is not showing anything ("We didn't find any data"). I'm not sure what is wrong here.

1. Column names are correct

2. Formula is correct

3. If I used SortByColumns on 1 column (either mentioned columns above), it worked. But when I combine it, it's not working.

 

 

 

SortByColumns(
 BankReconciliation_Summary,
 "StatementDate",
 SortOrder.Descending,
 "TransactionAmount_x002d_Credit",
 SortOrder.Ascending
)

 

 

Screenshot 2023-08-08 010048.png

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    @mychau ,

    There is nothing wrong with the code and it should work. You can nest Sort Functions

    Sort(
       Sort(
           DataSource,
           Field1,
           Order1
       ),
       Field2,
       Order2
    )

    but you should not have to do this. 

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Verified answer
    mychau Profile Picture
    56 on at

    Hi @WarrenBelz ,

    Thank you so much for your prompt help. I just discovered that multiple-level sorting does not work on Sharepoint List over 5,000 records. I've tried your suggested workaround but still no result. I guess I have no option but to accept one-level sorting only.

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    @mychau ,

    If you index the columns you are sorting on, it may work - I have not struck that particular restriction before

  • mychau Profile Picture
    56 on at

    I did index the columns used in sorting.

    It took me hours of searching in the forum and I came across someone with same issue.

    Solved: Re: Threshold Limits - Multiple Levels of Gallery ... - Page 2 - Power Platform Community (microsoft.com)

    I will find some workaround to reduce the records in my SharepointList so I could use the multiple level sorting again 😞

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard