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 / How I can add the date...
Power Apps
Answered

How I can add the date filtering to my existing Powerapps gallery filter

(0) ShareShare
ReportReport
Posted on by 89

Hi Experts,

I am kinda new to Powerapps and having issues adding additional filters to my Gallery, I have a SharePoint List data named "Payment Center Request" and 2 combo box, but I would also like to filter the result between the date period specified.

Champ14_0-1667797473598.png

 

Here's my code without the calendar picker:


If(
ComboBox1_3.Selected.Value = Text("All Records"),
If(
ComboBox1_2.Selected.Value = Text("All Records"),
'Payment Request Center',
Filter(
'Payment Request Center',
'Request type' = ComboBox1_2.Selected.Value
)
),
Filter(
If(
ComboBox1_2.Selected.Value = Text("All Records"),
'Payment Request Center',
Filter(
'Payment Request Center',
'Request type' = ComboBox1_2.Selected.Value
)
),
AppStatusFilter = ComboBox1_3.Selected.Value
)
)


using the below code, filter the result from the date but not sure how I can integrate this to the previous code.

Filter(
'Payment Request Center',
'Request Date' >= dte_StartDate.SelectedDate,
'Request Date' <= dte_EndDate.SelectedDate
)


Thanks in advance!

Categories:
  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Hi @Champ14 ,

    Try this format

    Filter(
     'Payment Request Center',
     ( 
     Len(ComboBox1_2.Selected.Value) = 0 ||
     'Request type' = ComboBox1_2.Selected.Value
     ) && 
     (
     ComboBox1_3.Selected.Value = "All Records" ||
     Len(ComboBox1_3.Selected.Value) = 0 ||
     AppStatusFilter = ComboBox1_3.Selected.Value
     ) && 
     'Request Date' >= dte_StartDate.SelectedDate &&
     'Request Date' <= dte_EndDate.SelectedDate
    )

     

    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

  • Champ14 Profile Picture
    89 on at

    Thanks @WarrenBelz , Tested it out and only the "Payment Type" works, changing the other filters does not do anything. Additional info,

    Payment Type filter is a combo box under ComboBox1_2
    Status filter is combo box under ComboBox1_3

  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    @Champ14 ,

    Payment type is not in your code - only 'Request type' (which is on ComboBox1_2) and AppStatusFilter (I assume that is a field in 'Payment Request Centre'). My response is only as good as the information you post and the code is valid for that. Please check the values you have supplied.

  • Champ14 Profile Picture
    89 on at

    Hi @WarrenBelz , sorry for the confusion, Yes indeed it is Request Type and not Payment Type (Payment Type is the wordings indicated from the print screen -sorry from the confusion) but the column name in SharePoint List is Request Type.

    AppStatusFilter  - is a column in SP List named Payment Request Center


  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    Hi @Champ14 ,

    OK back to the filter I supplied

    Filter(
     'Payment Request Center',
     ( 
     Len(ComboBox1_2.Selected.Value) = 0 ||
     'Request type' = ComboBox1_2.Selected.Value
     ) && 
     (
     ComboBox1_3.Selected.Value = "All Records" ||
     Len(ComboBox1_3.Selected.Value) = 0 ||
     AppStatusFilter = ComboBox1_3.Selected.Value
     ) && 
     'Request Date' >= dte_StartDate.SelectedDate &&
     'Request Date' <= dte_EndDate.SelectedDate
    )

    It is filtering 'Payment Request Center' with the following logic: -

    • If ComboBox1_2 (you might look at naming protocols for your controls) is blank, do not filter otherwise filter where 'Request type' is equal to the selected value AND
    • If ComboBox1_3 is blank OR "All Records" are selected, do not filter otherwise filter where AppStatusFilter is equal to the selected value AND
    • 'Request Date' is between the two date picker selections (ensure you have dates in these)

    Is there something incorrect here ?

     

    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

  • Champ14 Profile Picture
    89 on at

    Hi @WarrenBelz ,

    There is no "Blank" selection from the Combobox, ComboBox1_2 has these selections ["All Records","Low Risk Payment", "High Risk Payment"]

    Champ14_0-1667810856013.png


    For ComboBox1_3,

    Champ14_1-1667810891315.png


    Users will not be able to select any "Blank" entries and needs to select on either of the selection provided and by default, "All Records" are selected as I want to show all records when they load the screen.



  • WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    @Champ14 ,

    If you want to enforce input on both Combo Boxes (blank simply means nothing selected), just delete the two lines with Len( . . ) in them

    Filter(
     'Payment Request Center',
     'Request type' = ComboBox1_2.Selected.Value && 
     (
     ComboBox1_3.Selected.Value = "All Records" ||
     AppStatusFilter = ComboBox1_3.Selected.Value
     ) && 
     'Request Date' >= dte_StartDate.SelectedDate &&
     'Request Date' <= dte_EndDate.SelectedDate
    )

    With the above, nothing will show until all 4 controls have data selected.

     

    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

  • Champ14 Profile Picture
    89 on at

    Hi @WarrenBelz ,

    I am sorry, If I am not clear.. Thanks for your assistance.

    I want to show all records by default without any filters using ConboBox1_2 and ComboBox 1_3, these two ComboBox has "All Records" pre-selected on them, selecting "All Records" will show all records, not unless filter were applied on either of the two combo boxes. 

    Champ14_0-1667812602642.png


    My script above works, but I'm unable to assocate the calendar filter in it. So the goal is, when user selects All Records on either of the two comboboxes, it will shows all records corresponding to the date range specified from the calendar.

    Hope this makes clear. 🙂


  • Verified answer
    WarrenBelz Profile Picture
    156,570 Most Valuable Professional on at

    @Champ14 ,

    I thought you might work it out from what I posted

    Filter(
     'Payment Request Center',
     (
     ComboBox1_2.Selected.Value = "All Records" ||
     'Request type' = ComboBox1_2.Selected.Value
     ) &&
     (
     ComboBox1_3.Selected.Value = "All Records" ||
     AppStatusFilter = ComboBox1_3.Selected.Value
     ) && 
     'Request Date' >= dte_StartDate.SelectedDate &&
     'Request Date' <= dte_EndDate.SelectedDate
    )

     Please take a moment to understand the structure (see my explanation a few posts back).

     

    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

  • Champ14 Profile Picture
    89 on at

    Thank you @WarrenBelz , this works, I actually did but I missed out 1 "&&". Thank you so much for your patience and assistance!

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard