cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
F_Quint
Helper IV
Helper IV

Filter Gallery by date equal or greater than now

Hi I have a SharePoint Calendar with a column called Start Time, and I'd like to filter my gallery items to only events where the start date is equal to or greater than now. 

 

I tried with the following formula on my gallery's items property, but nothing is displaying so I must have something wrong with it. 

 

 

SortByColumns(Filter('Change Management Calendar', 'Start Time' >= Now()), "Created", Descending)

 

 

F_Quint_0-1605819914857.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @F_Quint ,

You have a Delegation warning on this as Date queries are not Delegable, However if what you are after is in the newest records, try this

With(
   {
      wCalendar:
      Sort(
         'Change Management Calendar',
         ID,
         Descending
      )
   },
   SortByColumns(
      Filter(
         wCalendar,
         'Start Time' >= Now()
      ),
      "Created",
      Descending
   )
)

You actually should not need the sort as the data sample will already be sorted this way.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @F_Quint ,

You have a Delegation warning on this as Date queries are not Delegable, However if what you are after is in the newest records, try this

With(
   {
      wCalendar:
      Sort(
         'Change Management Calendar',
         ID,
         Descending
      )
   },
   SortByColumns(
      Filter(
         wCalendar,
         'Start Time' >= Now()
      ),
      "Created",
      Descending
   )
)

You actually should not need the sort as the data sample will already be sorted this way.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Hi @WarrenBelz  yes, I'm after the newest records. I tried the formula you kindly provided but it did not work. 

 

F_Quint_0-1605821053464.png

 

@F_Quint ,

Sorry typing error now corrected - colon: needed instead of comma,

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Thanks again @WarrenBelz . Looks like the formula is incomplete. 

I tinker around with it and see if I can get it working. 

 

F_Quint_0-1605833762215.png

 

 

@F_Quint ,

Having a bad day on a small screen - it should work now.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

@WarrenBelz  it sure does. Thank you so much for your time and help!!!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,348)