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 to filter Records ...
Power Apps
Answered

How to filter Records in Browse Gallery based on current date

(1) ShareShare
ReportReport
Posted on by 47

Hello All,

 

I am new to powerpps i just started buiding my custom application the tool is quite interesting. I am having a trouble to filter the data in gallery based on current date. The requirment is to show the today created records only in the galary. Please help me with the formula like the one i tried is 

 

Filter('FO-HK', Created = Select_x0020_Date)

 

But it is not retruning any data. The screen is blank.

 

Many Thanks in advance.

Khichi.

 

 

Categories:
I have the same question (0)
  • dinusc Profile Picture
    Microsoft Employee on at

    Hello Khichi,

     

    A possible issue in date comparisson could be that you're trying to cmopare a Date value with a DateTime value. Try:

    Filter('FO-HK', DateValue(Created) = Select_x0020_Date)

    or 

    Filter('FO-HK', DateValue(Created) = DateValue(Select_x0020_Date))
  • Khichi Profile Picture
    47 on at

    Hello Dinusc,

     

    Thankd for your quick reponse, i tried both ways as advised by yourself but he screen is coming balnk without any dat, please see the attached screen shots. It's not mendotary to put created = select_date, actullay what i need is to show today created records only.

     

     

    Many Thanks,

    Khichi.

    Capture1.JPG
    Capture2.JPG
  • dinusc Profile Picture
    Microsoft Employee on at

    The errors (red underlines) from the second screenshot is most likely the reason your formula does not work. Can you post those errors?

  • Khichi Profile Picture
    47 on at

    Please see the attached sceen ahot for error detials:

     

    Many Thanks,

    Naveed.

    Capture3.JPG
  • Verified answer
    dinusc Profile Picture
    Microsoft Employee on at

    It looks like my assumption was wrong. Your "Select_x0020_Date" is a type of Date, not Text You could have Select_x0020_Date.Text to avoid this error but before doing this, please check the following:

    1. The type of the "Created" variable. Is it Text or Date?

    2. Check both Created and Select_x0020_Date values (by assigning them to Labels for example) to ensure they are in the same format and time zone

    3. Bring both parameters to the same standard and type. Check https://docs.microsoft.com/en-ca/powerapps/maker/canvas-apps/functions/function-date-time and https://docs.microsoft.com/en-ca/powerapps/maker/canvas-apps/show-text-dates-times for more help

    4. Rewrite your formula so it has both parameters in the same standard and type.

    Hope this helps.

  • Khichi Profile Picture
    47 on at

    Thanks dear it was a great help i tried to filter with below formula

     

    Filter('FO-HK', DateValue(Date) = DateValue(Date))

    One more clarification if i want to put search through textbox how i will achieve this.

  • dinusc Profile Picture
    Microsoft Employee on at

    I assume you did not want to include the "Date" column 2 times in your formula. 

    If you wanted to search according to a value from a text box, then the following should work:

    Filter('FO-HK', DateValue(Date) = DateValue(TextInput1.Text))

    This assumes that "Date" as a text field from your "FO-HK" source and TextInput1 is the text input control that contains the date value the source needs to be filtered on.

  • Khichi Profile Picture
    47 on at

    Yes you are 100% right i want to compare the

    DateValue(Date) with current date

    Can you please guide this. Also if possible to put the search filter as well within the same formula.

     

     

    Many Thanks

     

  • Khichi Profile Picture
    47 on at

    Hi Dinusc,

     

    Thanks for putting me on right track i figure it out by adding a textinput and then got the current date with it and compare it in the filter like below

     

    Filter('FO-HK', Text(Date, "[$-en-US]dd-mm-yyyy") = Text(TextInput1.Text))

    It is working perfectly, now only one more query i just want to add search feature within the above filter to search the record based on user in put in the serach textbox.

  • dinusc Profile Picture
    Microsoft Employee on at

    I believe your formula should work for alowing the user to provide the search string, unless I don't understand correctly.

    For example, if you have a gallery control (Gallery1) and a Text input control (TextInput1). Then:

    Gallery1.Items=Filter('FO-HK', Text(Date, "[$-en-US]dd-mm-yyyy") = Text(TextInput1.Text))

     

    Now, when you type in your Text input control, the gallery will filter automatically. Is that the intended behavior?

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard