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 / SortByColumns NOT Sort...
Power Apps
Answered

SortByColumns NOT Sorting by Column name Date but Sorting by ID

(0) ShareShare
ReportReport
Posted on by 195

Hello Powerapps Experts, 

Good day! 

I would like to seek your help regarding sortbycolumns.  So I used my Code below. 

SortByColumns(
 Filter(
 colRPNViewItems,
 Team = Cmb_Team.Selected.Result || Cmb_Team.Selected.Result = Blank(),
 Originator = Cmb_Originator.Selected.Result || Cmb_Originator.Selected.Result = Blank(),
 IncidentType = Cmb_AlertType.Selected.IncidentType || IsBlank(Cmb_AlertType),
 (DateValue(NewIncidentDate) >= DatePicker_StartDate.SelectedDate && DateValue(NewIncidentDate) <= DatePicker_EndDate.SelectedDate),
 IncidentModule in multiselectModule.Result || IsBlank(Cmb_Module),
 PrimaryDropDown = Cmb_PrimaryCause.Selected.Result || IsBlank(Cmb_PrimaryCause),
 Brand in multiselectBrand.Result || IsBlank(Cmb_Brand),
 (PlantID = Dd_Plantid_2.Selected.PlantID || IsBlank(Dd_Plantid_2.Selected.PlantID)),
 IncidentModule in multiselectModule.Result || IsBlank(Cmb_Module)
 ),
 "DateEntered",
 If(
 locSortAscending,
 Ascending,
 Descending
 )
 )

 

But the result order is not in proper order. Instead it was sorting by ID column rather than DateEntered.

 

YamiteKudasai_0-1661265127896.png

 

 How to solve this issue? Thanks in advance for your help.


Categories:
I have the same question (0)
  • Verified answer
    Gochix Profile Picture
    1,937 Moderator on at

    Hi @YamiteKudasai ,

     

    Possibly something wrong with your Filter formula?

     

    Try to add bit by bit to your filter and see if there is a problem.

    Working fine with a test :

     

    Gochix_0-1661266772045.png

    Source:

    Gochix_1-1661266793694.png


    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • haris00000001 Profile Picture
    85 on at

    Please follow this article: 

    haris00000001_0-1661327424652.png

    https://docs.microsoft.com/en-us/power-platform/power-fx/reference/function-sort

     

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
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard