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 Automate / Filter Query for Share...
Power Automate
Answered

Filter Query for SharePoint List Get Items Not Working

(1) ShareShare
ReportReport
Posted on by 10
Hi,
 
New to power automate and I cannot get the date part of my filter query correct. Copilot is not helping and none of the community questions seem to have the answer that will correct the issue.
 
Trying to filter my SharePoint list via two columns, the status and the date. The status is formatted as a choice column and date is formatted as a date column.
 
If I use just the status filter, the flow runs.
Status eq 'Approve'
 
When I try to filter by the date for the previous month, I get errors. 
Status eq 'Approve' and Date ge startOfMonth(subtractFromTime(utcNow(), 1, 'Month'),'yyyy.MM.dd') or Date lt startOfMonth(utcNow(), 'yyyy.MM.dd')
 
Any help with the query syntax would be greatly appreciated.
flow-filter-query.PNG
flow-error-message.PNG
flow-error-message-copilot.PNG
Categories:
  • Verified answer
    David_MA Profile Picture
    15,587 Super User 2026 Season 2 on at
    For filter queries, the date needs to be formatted as an ISO8601 formatted date, which is yyyy-MM-dd. You also need to put each of the expressions within single quotes or it will treat the date as a number instead.
  • CL-30071415-0 Profile Picture
    10 on at
    Thank you so much! The flow is now working with the correct filters :)
  • Suggested answer
    eliotcole Profile Picture
    4,441 Moderator on at
    Hi, CL ... I see that there are a number of PDFs attached, but I cannot download files.
     
    Do you have any imagery of your flow, and how it is structured around this part? If so, can you embed them into your original question, above?
    Trying to filter my SharePoint list via two columns, the status andthe date. The status is formatted as a choice column and date is formatted as a date column.
     
    If I use just the status filter, the flow runs.
     
    Status eq 'Approve'
     
    When I try to filter by the date for the previous month, I get errors.
     
    Status eq 'Approve' and Date ge startOfMonth(subtractFromTime(utcNow(), 1, 'Month'),'yyyy.MM.dd') or Date lt startOfMonth(utcNow(), 'yyyy.MM.dd')
    ---
     
    In terms of the actual ODATA filter section, and your specific issue ... I believe that it is because your dates are not within single quotes, and also within an expression.
     
    If you switch it to the advanced view you should be able to be a bit more free and easy with putting it all together:
     
     
    Once there ... paste this in, it should work:
    ( Status eq 'Approve' ) and ( Date ge '@{startOfMonth(subtractFromTime(utcNow(), 1, 'Month'))}' and Date lt '@{startOfMonth(utcNow(), 'yyyy.MM.dd')}' )
    It might also allow you to switch back to the normal view, too.
     
    Oh ... and you'll note that I set it to 'AND' on the final filter ... because (and I could be mistaken ... but ... ) using 'or' will essentially just get anything 😏
     
    ---
     
    You might also just find it easier to create a view which accomplishes your goal (if the filtering is available there) then only add what minimal filtering is needed on top of the view.

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 Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 355

#2
11manish Profile Picture

11manish 336 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard