cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Sorting data table for date

Hi, 

 

I'm am trying to sort my data table in order of newest date at the top and older records at the bottom. As you can see from the picture it is currently oldest records at the top and newest at the bottom. 

 

I am relatively new to power apps and have tried creating the code using the formula reference page without success.

 

Is anyone able to help with this? 

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Advocate I
Advocate I

Hi @Channah 

 

This formula should help you:

 

SortByColumns(YourSource, Date, Descending)


Descending helps you bring your column in the right order that the newest dates are shown first.

Please let me know if this solves your problem or if I misunderstood it.

View solution in original post

4 REPLIES 4
Highlighted
Advocate I
Advocate I

Hi @Channah 

 

This formula should help you:

 

SortByColumns(YourSource, Date, Descending)


Descending helps you bring your column in the right order that the newest dates are shown first.

Please let me know if this solves your problem or if I misunderstood it.

View solution in original post

Highlighted

Hi, 

 

Thanks for the response. 

 

How would I make the work with other code?  

Picture of my attempt attached. 

Highlighted

Hi @Channah 

 

You need to use the formula for your "Items" in the data table, where you put in your datasource.
So for your datatable you need to change the "Items"-field from 'MyDataSource' to the formula you put in behind your Text formula.

 

Hope this helps.

 

Highlighted

Brilliant Thanks for your help!!!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,636)