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 / Multiple filters diffe...
Power Apps
Answered

Multiple filters different types with date etc.

(0) ShareShare
ReportReport
Posted on by 2,567

After trying to get this to work I just made it worse 😂

I cant get the date column filtering to work.
I know I have delegation warnings but at this time it will just pull random, it will not look at the date columns even if I select any, I always need to select todays date on the End date to display any results at all.

It is a large list so I guess pulling collections together based on filtering would be one option, this would also get rid of delegation issues, but unsure why it's not currently working.

 

If(
 TabListDataSource.Selected.Value = "Datasource: Archive",
 Search(
 Filter(
 SortByColumns(
 HelpdeskArchive,
 "Created",
 SortOrder.Descending
 ),
 IsBlank(FilterRequester_2.Selected.Mail) || false || RequesterEmail = FilterRequester_2.Selected.Mail,
 IsBlank(FilterAssignedTo_2.Selected.displayName) || false || 'Assigned To'.DisplayName = FilterAssignedTo_2.Selected.displayName,
 IsEmpty(FilterStatus_2.SelectedItems) || CountIf(
 FilterStatus_2.SelectedItems,
 Value = Status.Value
 ) > 0,
 IsEmpty(FilterCaseType.SelectedItems) || CountIf(
 FilterCaseType.SelectedItems,
 Value = 'Case Type'.Value
 ) > 0,
 IsEmpty(FilterCategory_2.SelectedItems) || false || CountIf(
 FilterCategory_2.SelectedItems,
 Value = 'Case Category'
 ) > 0,
 IsBlank(DatePickerStart.SelectedDate) && IsBlank(DatePickerEnd.SelectedDate) || false || If(
 TabListDateRelation.Selected.Value = "Date by Closed",
 IsBlank(DatePickerStart.SelectedDate) && IsBlank(DatePickerEnd.SelectedDate) || false || ClosingDate >= DatePickerStart.SelectedDate && ClosingDate <= DatePickerEnd.SelectedDate,
 IsBlank(DatePickerStart.SelectedDate) && IsBlank(DatePickerEnd.SelectedDate) || false || Created >= DatePickerStart.SelectedDate && Created <= DatePickerEnd.SelectedDate
 )
 ),
 SearchInput1_3.Text,
 "RequesterEmail",
 "Title",
 "TicketID",
 "CaseCategory"
 )

 

 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,545 Most Valuable Professional on at

    Hi @JimmyWork ,

    Please note that I have looked at structure only here and assuming that your logic works for the result you need. I have also used consistent syntax to make it easier to follow (so there was nothing wrong with the top part of your filter except you do not false in there. I have also condensed your blank data picker reference at the bottom - you only need it once, not three times. Note this is all free-typed, so watch brackets and commas etc.

    If(
     TabListDataSource.Selected.Value = "Datasource: Archive",
     Search(
     Filter(
     SortByColumns(
     HelpdeskArchive,
     "Created",
     SortOrder.Descending
     ),
     (
     IsBlank(FilterRequester_2.Selected.Mail) || 
     RequesterEmail = FilterRequester_2.Selected.Mail
     ) &&
     (
     IsBlank(FilterAssignedTo_2.Selected.displayName) || 
     'Assigned To'.DisplayName = FilterAssignedTo_2.Selected.displayName
     ) &&
     (
     IsEmpty(FilterStatus_2.SelectedItems) || 
     CountIf(
     FilterStatus_2.SelectedItems,
     Value = Status.Value
     ) > 0
     ) &&
     (
     IsEmpty(FilterCaseType.SelectedItems) || 
     CountIf(
     FilterCaseType.SelectedItems,
     Value = 'Case Type'.Value
     ) > 0
     ) &&
     (
     IsEmpty(FilterCategory_2.SelectedItems) || 
     CountIf(
     FilterCategory_2.SelectedItems,
     Value = 'Case Category'
     ) > 0
     ) &&
     (
     (
     IsBlank(DatePickerStart.SelectedDate) && 
     IsBlank(DatePickerEnd.SelectedDate)
     ) || 
     If(
     TabListDateRelation.Selected.Value = "Date by Closed",
     (
     ClosingDate >= DatePickerStart.SelectedDate && 
     ClosingDate <= DatePickerEnd.SelectedDate
     ),
     (
     Created >= DatePickerStart.SelectedDate && 
     Created <= DatePickerEnd.SelectedDate
     )
     )
     )
     ),
     SearchInput1_3.Text,
     "RequesterEmail",
     "Title",
     "TicketID",
     "CaseCategory"
     )
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • JimmyW Profile Picture
    2,567 on at

    Thank you @WarrenBelz always great answers.
    I decided to re-work everything as it had more issues then I thought. This is the working result I ended up with.
    It caused issues with Assigned To field and when i switched DataSource etc.

    If(
     TabListDataSource.Selected.Value = "Datasource: Archive",
     If(
     TabListDateRelation.Selected.Value = "Date by Closed",
     Filter(
     Sort(
     HelpdeskArchive,
     ClosingDate,
     SortOrder.Descending
     ),
     CountRows(FilterCategory_2.SelectedItems) = 0 || 'Case Category' in FilterCategory_2.SelectedItems.Value,
     CountRows(FilterStatus_2.SelectedItems) = 0 || Status.Value in FilterStatus_2.SelectedItems.Value,
     CountRows(FilterCaseType.SelectedItems) = 0 || 'Case Type'.Value in FilterCaseType.SelectedItems.Value,
     IsBlank(FilterAssignedTo_2.Selected) || 'Assigned To'.DisplayName = FilterAssignedTo_2.Selected.displayName,
     IsBlank(FilterRequester_2.Selected) || RequesterEmail = Text(Lower(FilterRequester_2.Selected.Mail)),
     IsBlank(DatePickerStart.SelectedDate) || ClosingDate >= DatePickerStart.SelectedDate,
     IsBlank(DatePickerEnd.SelectedDate) || ClosingDate <= DatePickerEnd.SelectedDate,
     IsBlank(SearchInput1_3.Text) || SearchInput1_3.Text in Title || SearchInput1_3.Text in TicketID
     ),
     Filter(
     Sort(
     HelpdeskArchive,
     CreatedDate,
     SortOrder.Descending
     ),
     CountRows(FilterCategory_2.SelectedItems) = 0 || 'Case Category' in FilterCategory_2.SelectedItems.Value,
     CountRows(FilterStatus_2.SelectedItems) = 0 || Status.Value in FilterStatus_2.SelectedItems.Value,
     CountRows(FilterCaseType.SelectedItems) = 0 || 'Case Type'.Value in FilterCaseType.SelectedItems.Value,
     IsBlank(FilterAssignedTo_2.Selected) || 'Assigned To'.DisplayName = FilterAssignedTo_2.Selected.displayName,
     IsBlank(FilterRequester_2.Selected) || RequesterEmail = Text(Lower(FilterRequester_2.Selected.Mail)),
     IsBlank(DatePickerStart.SelectedDate) || CreatedDate >= DatePickerStart.SelectedDate,
     IsBlank(DatePickerEnd.SelectedDate) || CreatedDate <= DatePickerEnd.SelectedDate,
     IsBlank(SearchInput1_3.Text) || SearchInput1_3.Text in Title || SearchInput1_3.Text in TicketID
     )
     ),
     If(
     TabListDateRelation.Selected.Value = "Date by Closed",
     Filter(
     Sort(
     Helpdesk,
     ClosingDate,
     SortOrder.Descending
     ),
     CountRows(FilterCategory_2.SelectedItems) = 0 || 'Case Category' in FilterCategory_2.SelectedItems.Value,
     CountRows(FilterStatus_2.SelectedItems) = 0 || Status.Value in FilterStatus_2.SelectedItems.Value,
     CountRows(FilterCaseType.SelectedItems) = 0 || 'Case Type'.Value in FilterCaseType.SelectedItems.Value,
     IsBlank(FilterAssignedTo_2.Selected) || 'Assigned To'.DisplayName = FilterAssignedTo_2.Selected.displayName,
     IsBlank(FilterRequester_2.Selected) || RequesterEmail = Text(Lower(FilterRequester_2.Selected.Mail)),
     IsBlank(DatePickerStart.SelectedDate) || ClosingDate >= DatePickerStart.SelectedDate,
     IsBlank(DatePickerEnd.SelectedDate) || ClosingDate <= DatePickerEnd.SelectedDate,
     IsBlank(SearchInput1_3.Text) || SearchInput1_3.Text in Title || SearchInput1_3.Text in TicketID
     ),
     Filter(
     Sort(
     Helpdesk,
     CreatedDate,
     SortOrder.Descending
     ),
     CountRows(FilterCategory_2.SelectedItems) = 0 || 'Case Category' in FilterCategory_2.SelectedItems.Value,
     CountRows(FilterStatus_2.SelectedItems) = 0 || Status.Value in FilterStatus_2.SelectedItems.Value,
     CountRows(FilterCaseType.SelectedItems) = 0 || 'Case Type'.Value in FilterCaseType.SelectedItems.Value,
     IsBlank(FilterAssignedTo_2.Selected) || 'Assigned To'.DisplayName = FilterAssignedTo_2.Selected.displayName,
     IsBlank(FilterRequester_2.Selected) || RequesterEmail = Text(Lower(FilterRequester_2.Selected.Mail)),
     IsBlank(DatePickerStart.SelectedDate) || CreatedDate >= DatePickerStart.SelectedDate,
     IsBlank(DatePickerEnd.SelectedDate) || CreatedDate <= DatePickerEnd.SelectedDate,
     IsBlank(SearchInput1_3.Text) || SearchInput1_3.Text in Title || SearchInput1_3.Text in TicketID
     )
     )
    )

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard