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 / Need Help sorting a da...
Power Apps
Answered

Need Help sorting a date values dropdown

(0) ShareShare
ReportReport
Posted on by 13

I have a dropdown filter for Delivered dates on my app that pulls data from a SharePoint list, but for some reason, the dates are been filtered sequentially such as Month first, Day second, and Year last(see screenshot).

I need the dates to be in chronological  (Newest to the oldest)
02/11/2023

02/05/2023

01/20/2023

09/01/2021

02/10/2021

here is the code I'm currently using which is creating what you see on the screenshot.

Sort(Distinct('Deliveries Library',Text('Actual Delivery Date',"mm/dd/yyyy")),ThisRecord.Value,SortOrder.Descending)

 

Any help would be highly appreciated.

2023-06-27 14_56_19-Window.png
Categories:
  • Verified answer
    timl Profile Picture
    37,418 Super User 2026 Season 2 on at

    Hi @FA-powerCreator 

    You'll need to sort by the date, rather than the text representation of the date.

    Sort(
     Distinct(
     'Deliveries Library',
     'Actual Delivery Date'
     ),
     ThisRecord.Value,
     SortOrder.Descending
    )

     

  • FA-powerCreator Profile Picture
    13 on at

    Thank you so much.
    I understand the mistake I made and your solution worked. One last thing how can I add an "All" value to the top/default value? or do I need to use a combo box instead?

  • timl Profile Picture
    37,418 Super User 2026 Season 2 on at

    @FA-powerCreator - it's possible to add a 'All' value, but the easiest solution would be to use a combo box.

  • FA-powerCreator Profile Picture
    13 on at

    with a combo box, the dates look like this. I think this is the reason I was using converting the Date values into Text (initially).

    2023-06-28 14_01_17-Window.png

  • timl Profile Picture
    37,418 Super User 2026 Season 2 on at

    Hi @FA-powerCreator 

    To display the formatted value in a combobox, you can add a column that shows the formatted value (eg, "DateDisplay"), whilst sorting by the actual date value.

     

    Sort(
     AddColumns( 
     Distinct(
     'Deliveries Library',
     'Actual Delivery Date'
     ),
     "DateDisplay",
     Text(Value, "mm/dd/yyyy"))
     ,
     ThisRecord.Value,
     SortOrder.Descending
    )

     

  • FA-powerCreator Profile Picture
    13 on at

    that did it .. i learned something new... thank you so much!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 194 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 150

Last 30 days Overall leaderboard