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 between dates w...
Power Apps
Answered

Filter between dates with other Drop downs and a SharePoint Galley

(0) ShareShare
ReportReport
Posted on by 33

Hello 

I am trying to expand on my gallery filtering  to now include date picker options as well as my  Drop down to sort by Status  but not having any luck 

 

 This is what i am using  everything works fine before the 2nd IF(startDate.SelectedDate   I want the user to be able to select a range of dates to show items if the status and modified date are between the 2 date pickers. 


SortByColumns(
Filter(
ServiceRequest,
Department=Office365Users.MyProfile().Department,
IsBlank(StatusSelector.Selected.Result)=true Or Status.Value= StatusSelector.Selected.Result
,If(StartDate.SelectedDate)= "Modified" || "Modified" = EndDate.SelectedDate),
"{Identifier}",
Ascending
)DatePicker.jpg

Categories:
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Nix23,

    Based on the formula you provided, I think there is something wrong with it. I have made a test on my side, please consider take a try with the following workaround:

    1. Remove the Today() function from the DefaultDate property of the StartDatePicker and EndDatePicker control.

    2. Set the Items property of your Gallery to following:

    SortByColumns(
     Filter(
     ServiceRequest,
     Department = Office365Users.MyProfile().Department,
     If(IsBlank(StatusSelector.Selected.Result), true, Status.Value = StatusSelector.Selected.Result),
     If(
     !IsBlank(StartDate.SelectedDate) && !IsBlank(EndDate.SelectedDate),
     Value(Text(Modified, "yyyymmdd")) >= Value(Text(StartDate.SelectedDate, "yyyymmdd")) && Value(Text(Modified, "yyyymmdd")) <= Value(Text(EndDate.SelectedDate, "yyyymmdd")),
     true
     )
     ),
     "{Identifier}",
     Ascending
    )

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

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 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard