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 / Filtering a gallery wi...
Power Apps
Answered

Filtering a gallery with Datepicker

(0) ShareShare
ReportReport
Posted on by 11

Im really new to powerapps. I have a Gallery populated by a sharepoint list. This sharepoint list has a single line text column named Day and another column which is a Date and time column. I added a DatePicker control and on the OnChange property of it I need for it to filter the records on the sharepoint list so if the selected date in the DatePicker is for example a Monday it would show me only the records with Monday in the Day column. Is that even possible?

Categories:
I have the same question (0)
  • madlad Profile Picture
    2,637 Moderator on at

    It is! Try changing the Items of your gallery to something like:

    Filter(
     *YourSPList*,
     Text(DateTimePicker.SelectedDate, "dddd") = Day
    )

     

    Hope this helps!

  • GenioyFisura Profile Picture
    11 on at

    Thanks! I added that code to the Items property code of the gallery but I think the problem is on the OnChange property of the Datepicker as it's still not filtering anything. Im using: 
    Filter(MySPList, Text(Day) = Text(Weekday(DatePicker1.Value), "[$-en-US]dddd")) Im completely lost here

  • madlad Profile Picture
    2,637 Moderator on at

    Add this to the Items/Datasource property of your gallery, not the OnChange of your DatePicker.

     

    Filter isn't a function which inherently changes data - rather it returns a unique table based off of the data provided in it. As such, it won't change an existing collection/list by itself, it needs to be placed inside another function or property.

  • Verified answer
    Rajkumar_M Profile Picture
    3,747 Moderator on at

    Try this

    Filter( MySPList, Text(Weekday(DateColumn), "[$-en-US]dddd") = Text(Weekday(DatePicker1.SelectedDate), "[$-en-US]dddd") )

    Thanks!

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

  • GenioyFisura Profile Picture
    11 on at

    Thanks for your answer! It doesnt give me any errors (except for a delegation warning) but it is still not filtering, I mean I dont see any results in the gallery. Am I doing something wrong?

  • GenioyFisura Profile Picture
    11 on at

    Disregard my first response! It is working perfectly! Thank you so much!

  • Rajkumar_M Profile Picture
    3,747 Moderator on at
    1. Check the data type of the "Day" column in your SharePoint list. It should be a single line of text column.
    2. Check the format of the date value in the "Day" column. It should match the format used in the Text function in your formula.
    3. Check the format of the date value in the DatePicker control. It should match the format used in the Text function in your formula.
    4. Check the number of items in your SharePoint list. If it contains more than 500 items, the filter may not work correctly.
    5. Try using a combination of the Filter and Search functions to filter the records in the SharePoint list based on a date range.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 404

#2
timl Profile Picture

timl 344 Super User 2026 Season 1

#3
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

Last 30 days Overall leaderboard