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 SharePoint list...
Power Apps
Answered

Filter SharePoint list date column using date picker with = expression

(0) ShareShare
ReportReport
Posted on by 35

Hi all, I think I found a bug, I'm using the below filter in a gallery to show matches for a specific day, which is selected in a datepicker

 

Filter('member-availability', Available_Day = Date(Year(WhosAvailableDatePicker.SelectedDate),Month(WhosAvailableDatePicker.SelectedDate),Day(WhosAvailableDatePicker.SelectedDate)))

 

I get the error

 

"The requested operation is invalid

Server response, The expression "Available_Day eq 2017-10-25" is not valid"

 

But if the change the sing to a <=, => or <> it works but I only want the sign day? does anyone know of a work around?

Categories:
I have the same question (0)
  • Verified answer
    v-yamao-msft Profile Picture
    on at

    Hi AlanCampbell,

     

    I can reproduce this issue on my side. I will try to report it.


    When filter the gallery using date picker with = expression, it returns the same error message with you.

    3.PNG

     

    Then I figure out a workaround for this. Use Text function to convert the date to a string of text. I found that it works properly.
    Filter(List2,Date=Text(DatePicker1.SelectedDate,DateTimeFormat.ShortDate))

    4.PNG

     

    Please try the workaround on your side. Hope it will work for you.

     

    Best regards,
    Mabel Mao

  • Community Power Platform Member Profile Picture
    on at
    Hi Mabel Mao, Just saw your post and tried to replicate your solution. It doesn't work properly. It gives the following warning: Incompatible type. We can't evaluate your formula because the values being compared in the formula aren't the same type. The left value is a Date type and the right is a Text type. Is there currently any update on how else to resolve this issue? My current code is as follows: SortByColumns(Filter(Timesheet, Charge_date = Text(DatePicker1.SelectedDate,DateTimeFormat.ShortDate)), "Title", If(SortDescending1, Descending, Ascending))
  • Dawidvh Profile Picture
    1,346 on at

    Hi @Anonymous 

     

    Another thing to consider is that queries to date columns in SP are not delegatable (nor is calculated columns in SP), so if you have to use SharePoint for the data, the other option would be to use Flow to fetch the data and return it to PowerApps. Flow can use ODATA queries to get to the correct data and then possibly manipulate or join the data with other services before returning it to PowerApps. I love this approach and it has come in extremely handy in the past. Some might say that using a flow for retrieving data might feel 'expensive' but it does allow for many different functional and security options going forward.


    See below demo what can be achieved with this. Please see below and let us know if you have any questions or suggestions:

    https://youtu.be/m_j_xN7-LjU

     

    Twitter: @dawidvh

    YouTube: https://www.youtube.com/user/dawidvanheerden
    **If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions.

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard