web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Date Ranges in Galleri...
Power Apps
Unanswered

Date Ranges in Galleries and Filtering

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have looked around and can't seem to find a solution for this, so hopefully someone can help out.

I am working with a SP list that tracks projects, we collect employeeName, startDate, endDate and numHours

We have buttons that allow managers to set 'Current Week', 'Current Month', etc. or they can set a date range from calendar pickers and the dates get stored in varStartDate & varEndDate.

So here is the issue I am having.  If an employee has a project that goes from 03/01/2022 - 06/01/2022 with 400 hours, in the gallery  want to see the projects that fit the date range, but if a startDate or endDate fall into the range I also want to see it.   So say a user put 04/01/2022 - 04/15/2022 in the range for the gallery the above project details would show.  In my code it is not.

SortByColumns(
 Filter(
 colProjects, 
 employeeName = varSelectedEmployee,
 startDate >= varStartDate 
 endDate <= varEndDate
 ), varSortColumn,varSortDirection
)

I assume it is just my logic on the startDate and endDate >=<,  but how is my problem that I just cannot get my head around.

 

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Hack67 ,

     

    I think you may be missing an && operator there...

     

    SortByColumns(
     Filter(
     colProjects, 
     employeeName = varSelectedEmployee,
     startDate >= varStartDate &&
     endDate <= varEndDate
     ), varSortColumn,varSortDirection
    )

     

    Assuming startDate is the date being checked to see whether it falls on or after varStartDate that is, and the check is to see whether the input date range falls in between another date range, start to finish.

     

    WBP

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard