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 / Filter Multiple Date V...
Power Apps
Unanswered

Filter Multiple Date Values against other Multiple Date Values.

(0) ShareShare
ReportReport
Posted on by 46

Hi All, have been searching for hours, but cannot find an answer to my problem, I'm using a workaround at the moment, but it isn't very dynamic, or 'elegant'.

 

I've built a Staff Leave Request system, and all is good so far.. Now I'm adding in the 'nice to have' features.

 

When a Request is created, it adds all details to a SharePoint List, including a list of all dates between the start date and the end date. This all works fine, and is mainly used for preventing duplicate requests being created etc.

 

My problem is with searching between two date values.

 

For testing I have - StartDate Picker, EndDate Picker, and a ListBox which shows the ListOfDates table.

 

How can I search the 'Date Range' column in the Sharepoint List (which contains multiple lines of text - each line with a date value in text format) from the date values inside the ListOfDates collection?

 

The table of date values is collected any time either the StartDate picker or EndDate picker is changed. with the following OnChange formula -

 

ClearCollect(
ListOfDates,
ForAll(
Sequence(
Value(
DateDiff(
StartDate.SelectedDate,
EndDate.SelectedDate,
Days
) + 1
)
),
Text(
DateAdd(
StartDate.SelectedDate - 1,
Value,
Days
),
"[$-en-US]mm/dd/yyyy"
)
)
)

 

Anyone got any ideas?

Categories:
I have the same question (0)
  • Brammers Profile Picture
    46 on at

    Sorted it.

     

    Instead of messing about with Tables of values, I went back to basics and thought about where else the 'searchable data' is located (in my case the basic start and end dates were enough) using this code...

     

    Filter(
     SortByColumns(
     'SPListName',
     "Start_x0020_Date",
     Descending,
     "Staff_x0020_Name",
     Descending
     ),
     Status = "Approved" && ((StartDate.SelectedDate >= 'Start Date' && StartDate.SelectedDate <= 'End Date') || (EndDate.SelectedDate >= 'Start Date' && EndDate.SelectedDate <= 'End Date') || (StartDate.SelectedDate <= 'Start Date' && EndDate.SelectedDate >= 'End Date')))
  • Mari Profile Picture
    Microsoft Employee on at

    Hi! Thanks for updating the thread with your findings.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 977

#2
Valantis Profile Picture

Valantis 664

#3
11manish Profile Picture

11manish 530

Last 30 days Overall leaderboard