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 / Combine filter gallery...
Power Apps
Answered

Combine filter gallery statements for dates and startswith

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

i'm looking for help to combine two expressions to filter a gallery by two dates pickers (from and to) and a name search e.g. show results in gallery if dates are between 01/01/20 and 01/08/20 and client name starts with 'a'. I can get them to work individually just need to know how to combine them together. Here is what i have:

Date Picker: SortByColumns(Filter(SPlist,StartsWith(SPName,SearchBox.Text)),"ID",If(SortDescending1, Ascending,Descending))

 

Name Search: Filter(List, (ColDate>=DateFrom.SelectedDate) && (ColDate <=DateTo.SelectedDate))

 

any help much appreciated

 

thanks

 

Mike

 

 

Categories:
  • pawanjajoo Profile Picture
    191 on at

    Hi @Anonymous ,

     

    you can collect the two outputs in a collection and then combine them into 3rd collection.

     

    ClearCollect(Collect1, <Your formula to get 1st set of records>)

    ClearCollect(Collect2, <Your formula to get 2nd set of records>)

    ClearCollect(ColCombine, Collect1, Collect2)

     

    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
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you want to filter based on a textinput and two date pickers?

    If so, you just need to set the gallery's Items based on these three controls.

    Could you tell me the data type of ColDate column? I assume that it is date column(not includes time).

    Try to set the gallery's Items like this:

    SortByColumns(
    Filter(SPlist,
     StartsWith(SPName,SearchBox.Text),
     ColDate>=DateFrom.SelectedDate, 
     ColDate <=DateTo.SelectedDate
     ),
    "ID",If(SortDescending1, Ascending,Descending))

     

     

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for your response,

     

    I wasn't able to apply your solution so i ended up using a Toggle control instead to flip between date and client search. Which the customer was happy with.

     

    Mike

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    I'm glad that you've found the satisfied solution.

    Do you have any other problem?

    If not, could you mark my answer as solution?

    Thanks!

     

     

    Best regards,

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard