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

Update Formula to Filter by Checkbox-DatePicker-Combo Box

(0) ShareShare
ReportReport
Posted on by 5,331 Moderator

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
    154,496 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

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 531 Most Valuable Professional

#2
Haque Profile Picture

Haque 261

#3
Kalathiya Profile Picture

Kalathiya 221 Super User 2026 Season 1

Last 30 days Overall leaderboard