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 / Filter within a date r...
Power Apps
Unanswered

Filter within a date range

(0) ShareShare
ReportReport
Posted on by 140

Hello, I need the gallery to only show me the information within a range of dates that the user will select and then filter what he wants within that date range, if I use both codes separately it filters me by date or by the box of text but if I try to make it filter what the user writes inside the text box in the range that is selected then it does not work, what would be the correct way? I leave the code that I am trying to use:

 

Filter(CarReport;Date>=DTPStart.SelectedDate;Date<=DTPFin.SelectedDate)
&&
SortByColumns(Filter([@CarReport];StartsWith(Lote;txtsearch.Text));"Date";Ascending)

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    timl Profile Picture
    36,377 Super User 2025 Season 2 on at

    Hi @JamtMaster 

    You can combine the the date and text input in your search like so:

    SortByColumns(Filter([@CarReport];
     StartsWith(Lote;txtsearch.Text) && 
     Date>=DTPStart.SelectedDate &&
     Date<=DTPFin.SelectedDate)
     );
     "Date";
     Ascending
    )

     

     

  • Verified answer
    JamtMaster Profile Picture
    140 on at

    That code gave me an error (it says that an argument was placed and I expected more than 1) but looking at the way you organized it I put it in the following way and it worked for me so I mark it as valid, thank you very much.

     

    SortByColumns (Filter ([@ CarReport];
    StartsWith (Batch; txtsearch.Text);
    Date> = DTPStart.SelectedDate;
    Date <= DTPFin.SelectedDate); "Date"; Ascending)

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

WarrenBelz 840 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 332 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 275

Last 30 days Overall leaderboard