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

Trying to Descend with an already working Filter

Hi everyone,

 

Fairly new to Powerapps and have been working on a Project recently. Had some feedback which is great, however what I thought was simple, doesn't seem to work!

 

I am trying to get the Holiday Start date to descend by date alongside the filter. Any help would be greatly appreciated!

 

This is the code I have: Filter('Requests', 'Manager Email' = _CurrentUser.Email && (AllData.SelectedText.Value = "All" Or Title= AllData.SelectedText.Value) && Approved = "Approved" &&('Holiday Start Date' >= Today()|| ('Holiday Start Date' > Today() && ('Holiday End Date' >= Today())))) 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Anonymous
Not applicable

Hey, have you tried using Sort function?
That would be:

Sort (FILTER FUNCTION GOES HERE, 'Holiday Start Date', Descending)


Here's some more info about it: 
https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/functions/function-sort

View solution in original post

iAm_ManCat
Super User
Super User

SortByColumns(
   Filter(
          'Requests',
          'Manager Email' = _CurrentUser.Email
          && 
          ( AllData.SelectedText.Value = "All" 
            ||
            Title= AllData.SelectedText.Value )
          &&
          Approved = "Approved" 
          &&
          ('Holiday Start Date' >= Today()
            || 
            ( 'Holiday Start Date' > Today() 
              && 
              'Holiday End Date' >= Today()
            )
          )
   ),
   'Holiday Start Date',
   Descending
)
@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hey, have you tried using Sort function?
That would be:

Sort (FILTER FUNCTION GOES HERE, 'Holiday Start Date', Descending)


Here's some more info about it: 
https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/functions/function-sort

iAm_ManCat
Super User
Super User

SortByColumns(
   Filter(
          'Requests',
          'Manager Email' = _CurrentUser.Email
          && 
          ( AllData.SelectedText.Value = "All" 
            ||
            Title= AllData.SelectedText.Value )
          &&
          Approved = "Approved" 
          &&
          ('Holiday Start Date' >= Today()
            || 
            ( 'Holiday Start Date' > Today() 
              && 
              'Holiday End Date' >= Today()
            )
          )
   ),
   'Holiday Start Date',
   Descending
)
@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,700)