cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SPDK
New Member

Need to Filter by Ended = No and Sort by date, going forward from today.

HI,

I have a SP list called Events. I want the results to display only the items that haven't ended going forward from today's date.

 

Where the Ended field = No

Sort the list by EndDate_Time with the dates closest to Today displaying first.

 

I looked through other posts but couldn't find one that worked. I've tried multiple versions of filtering and sorting statements but so far unsuccessfully. I can get a simple filter to work on End Date, but not to sort by the date.

Thanks for your help!

2 REPLIES 2
kbilakanti
Resolver III
Resolver III

@SPDK  SortByColumns(Filter(<ListName>, Ended="No"), EndDate_Time)

Hi @SPDK

Sorting by date might not work because of the data format of that column. You might want to try something like this:

SortByColumns(Filter(AddColumns(<ListName>, "CustomDateColumn", DateDiff(EndDate_Time, Today())), Ended="No"), CustomDateColumn)

You might have to modify this formula a bit but hopefully it will give you some ideas to move forward. Let me know if this helps.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

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 (2,335)