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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter gallery using d...
Power Apps
Unanswered

Filter gallery using date range, 2 dropdowns and search box

(0) ShareShare
ReportReport
Posted on by 405

Hi all,

 

I can't seem to figure out how to filter a gallery with multiple filters. Currently I have two date pickers (from) and (to), a 'department' dropdown and a 'status' dropdown plus a seachbox. How can i incorporate all of these so that when a user only wants to filter by date ranges or just the department  or just status. Also if they want to search for the title of the item they can as well. I've been reading a lot as well on filtering dates and trying to avoid the delegation issue. Can someone please help me out on this one? 

 

filterFields.png

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @_sourcecod3_ ,

    I will give you a concept if you have under 2,000 items in your data set I(and have your settings to this)- the below should work without Delegation errors. If you have more than this, dates are not Delegable, so some additional thought may be required.

    With(
     {
     wFrom:YourFromDatePicker.SelectedDate,
     wTo:YourToDatePicker.SelectedDate,
     wDept:YourDepartmentSeach.Text,
     wStatus:YourStatusDD.Selected.Value
     wList:YourListName
     },
     Filter(
     wList,
     If(
    	 Value(wFrom)=0,
     true,
     YourDateField>=wFrom
     ) &&
     If(
     Value(wTo)=0,
     true,
     YourDateField<=wTo
     ) &&
     If(
     IsBlank(wDept)=0,
     true,
     StartsWith(YourDeptField,wDept)
     ) &&
     If(
     IsBlank(wStatus)=0,
     true,
     YourStatusField=wStatus)
     )
     )
    )

     

    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.

  • Verified answer
    WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @_sourcecod3_ ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    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.

  • _sourcecod3_ Profile Picture
    405 on at

    @WarrenBelz hi warren - i was able to figure it out, not exactly the same code are you provided but it did gear me into the right direction. 

     

    Thanks for your help

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard