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 / Update Formula to Filt...
Power Apps
Unanswered

Update Formula to Filter by Checkbox-DatePicker-Combo Box

(0) ShareShare
ReportReport
Posted on by 5,329 Super User 2025 Season 2

I am using the following to filter a Gallery; there is also a Combo Box, Checkbox and DatePickers that can be added to the filter using the formula.

Without the checkbox the Gallery shows me ONLY items associated with the choice made in the Combo Box, as desired.

However, as configured, when I check the Checkbox and set the DatePickers the Gallery returns all items on the list that are within the search range rather than ONLY the items within the range that are associated with the content of the Combo Box.

If(ReviewScreenEventDateRangeCheckbox,
Filter(
'Test List',
DateOfEvent>DateAdd(ReviewScreenEventStartDatePicker.SelectedDate,-1,Days)
&&
DateOfEvent<DateAdd(ReviewScreenEventEndDatePicker.SelectedDate,1,Days)

),Sort(
Filter(
'Test List',
Len(ReviewScreenSearchComboBox.Selected.Value) = 0 ||
StartsWith(
Title,
ReviewScreenSearchComboBox.Selected.Value)
),
varSortGallery
))

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

    @Phineas ,

    I just spent some time on the same code on this post. The problem here is that you need to specify the outcome you desire when posting large blocks of code, otherwise, the responder will just follow your current logic and put it in a valid format. I have changed the piece you have posted here to get the outcome you desire, but it may not fit in with the much larger piece on the other post mentioned.

    Sort(
     Filter(
     'Test List',
     (
     !ReviewScreenEventDateRangeCheckbox ||
     (
     DateOfEvent > DateAdd(ReviewScreenEventStartDatePicker.SelectedDate,-1,Days) &&
     DateOfEvent<DateAdd(ReviewScreenEventEndDatePicker.SelectedDate,1,Days)
     )
     ) &&
     (
     Len(ReviewScreenSearchComboBox.Selected.Value) = 0 ||
     StartsWith(
     Title,
     ReviewScreenSearchComboBox.Selected.Value
     )
     ),
     varSortGallery
     )
    )

     

    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.

    Visit my blog Practical Power Apps

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
Kalathiya Profile Picture

Kalathiya 421

#2
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard