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 / 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
    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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard