cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Robertjde
Helper V
Helper V

Sort Dropdownbox

Hallo everyone

 

I want to sort my dropdown box with the content date in descending order.


I already use the following formula

 

Dropdown Items:
Sort(Distinct(Entries;Datum);DateValue(Result);Descending)

 

I try it also with 

 

Sort(Distinct(Entries;Datum);DateTimeValue(Result);Descending)


Unfortunately, the application only sorts according to the first numbers (see picture please).

 

please help me to find the solution

 

Date2021.JPG

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Robertjde 

Consider specifying the language tag to have the DateValue property determine the date format.

For example:

    Sort(Distinct(Entries;Datum);DateValue(Result; "es");Descending)

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User
Super User

@Robertjde 

Consider specifying the language tag to have the DateValue property determine the date format.

For example:

    Sort(Distinct(Entries;Datum);DateValue(Result; "es");Descending)

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
v-qiaqi-msft
Community Support
Community Support

Hi@Robertjde,

Based on the issue that you mentioned, do you want to sort the date?

Could you please share a bit more about the scenario:

  1. what is your data source, a SP list or Excel table?
  2. what is the column type of the Datum, Date type or just Text type?

I assume that you use the SP list, and I have a test on my side, please take a try as below.

In my scenario, I have two kinds of columns, 'Date' is a Date and time type and the 'Title' is a Text type.

75.png

Combine that with your screenshot, you have a Text type date value, right?

If you have the general Date type column within the SP list, you could easily try the formula as below to get the right sort order:

Sort(Distinct(KB,Date),Result,Descending)

If you have a Text type for the date value, I think you should do some format work to get them ready for the sort order.

Sort(Distinct(KB,Title),DateValue(Substitute(Result,".","/"),"bg-BG"),Descending)

Note: Different regions have different separators and format for date, you should choose the right language tag to display your date.

Please check the GIF for reference.

010701Gif.gif

Regards,

Qi

Best Regards,
Qi

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,380)