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 Date...
Power Apps
Answered

Need Help Sorting Dates in Dropdown Menu from Collection

(0) ShareShare
ReportReport
Posted on by 15

Hello everyone,

 

I hope you're all doing well. I'm currently facing an issue with sorting dates in a dropdown menu that I've populated from a collection in Power Apps. The dates are currently displayed in cardinal number order, but I need them to be sorted chronologically.

I have a collection that contains date values, and I'm using that collection as the data source for my dropdown menu. I used this formula to populate the collection:

 

ClearCollect(colEmbarques;AddColumns(EMBARQUESs;"DataFormatadaEmbarques";Text(cr59e_datadesadabrasil;DateTimeFormat.ShortDate)))

 

However, when I display the dates in the dropdown, they appear like this:

 

Diving3565_0-1695606380131.png

With this formula on Items:

Sort(Distinct(colEmbarques;DataFormatadaEmbarques);Value;If(SortDescending1;SortOrder.Descending;SortOrder.Ascending))

 

I believe I need to apply another type of sorting function or formula to the collection after populating the dropdown, but I'm not sure how to achieve this. Can someone please guide me on how to sort the dates in the dropdown menu in chronological order?

 

Any assistance would be greatly appreciated. Thank you in advance!

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Diving3565 ,

     

    Please try:

    Sort(Distinct(colEmbarques;DataFormatadaEmbarques);DateValue(Value;"de");If(SortDescending1;SortOrder.Descending;SortOrder.Ascending))

     

    Best Regards,

    Bof

  • CU15101258-0 Profile Picture
    15 on at

    Thanks, it worked!

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
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard