cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PasanS
Level: Powered On

Filter Sharepoint list by latest date

I want to filter a sharepoint list by latest date(from date column). How can I return the latest date from the date column? 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filter Sharepoint list by latest date

Hi @PasanS,

 

My understanding is that you only want to get the records of the latest date to show in the gallery. Not just sort all the records in Descending order of date. If my understanding is correct, then your Items property's formula of Gallery should be:

 

Filter(ListName,Date=First(Sort(Distinct(ListName,Date),Result,Descending)).Result)

"Date" is your date column's name. I just tested and this works for me.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Filter Sharepoint list by latest date

Hi PasanS,

 

If you're using a gallery to view the data, the items: property formula would look something like this;

 

SortByColumns(SharePointList, "Created",Descending)

This will sort by the latest list item created - you should be able to just swap out "Created" with your date column.

 

Kind regards,

 

RT

Community Support Team
Community Support Team

Re: Filter Sharepoint list by latest date

Hi @PasanS,

 

My understanding is that you only want to get the records of the latest date to show in the gallery. Not just sort all the records in Descending order of date. If my understanding is correct, then your Items property's formula of Gallery should be:

 

Filter(ListName,Date=First(Sort(Distinct(ListName,Date),Result,Descending)).Result)

"Date" is your date column's name. I just tested and this works for me.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Super User
Super User

Re: Filter Sharepoint list by latest date

Helps if I read the question properly 😉

Anonymous
Not applicable

Re: Filter Sharepoint list by latest date

I have used your formula and it does give me the most current date.  I am needing to pull records where LoadUnloadDate >= LoadUnloadDate -1   in other words the current 2 days.  I cannot get this to work. What am I doing wrong!!!  Thanks for any help!

 

Filter(RailCarPasms,LoadUnloadDate=First(Sort(Distinct(RailCarPasms,LoadUnloadDate),Result,Descending)).Result)

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 160 members 5,966 guests
Please welcome our newest community members: